smalruby-editor 0.0.12 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of smalruby-editor might be problematic. Click here for more details.

Files changed (179) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/.travis.yml +2 -0
  4. data/LEGAL +32 -0
  5. data/Rakefile +1 -1
  6. data/app/assets/demos/default.xml +126 -0
  7. data/app/assets/demos/rgb_led_anode.xml +83 -0
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/application.js +18 -1
  10. data/app/assets/javascripts/block_mode.js.coffee.erb +10 -0
  11. data/app/assets/javascripts/blocks/blockly.js.coffee.erb +34 -0
  12. data/app/assets/javascripts/blocks/character.js.coffee.erb +76 -0
  13. data/app/assets/javascripts/blocks/control.js.coffee.erb +180 -0
  14. data/app/assets/javascripts/blocks/data.js.coffee.erb +6 -0
  15. data/app/assets/javascripts/blocks/etc.js.coffee.erb +6 -0
  16. data/app/assets/javascripts/blocks/events.js.coffee.erb +82 -0
  17. data/app/assets/javascripts/blocks/hardware.js.coffee.erb +313 -0
  18. data/app/assets/javascripts/blocks/looks.js.coffee.erb +163 -0
  19. data/app/assets/javascripts/blocks/motion.js.coffee.erb +297 -0
  20. data/app/assets/javascripts/blocks/operators.js.coffee.erb +279 -0
  21. data/app/assets/javascripts/blocks/pen.js.coffee.erb +6 -0
  22. data/app/assets/javascripts/blocks/ruby.js.coffee.erb +74 -0
  23. data/app/assets/javascripts/blocks/sensing.js.coffee.erb +241 -0
  24. data/app/assets/javascripts/blocks/sound.js.coffee.erb +75 -0
  25. data/{public/favicon.ico → app/assets/javascripts/collections/.keep} +0 -0
  26. data/app/assets/javascripts/collections/character_set.js.coffee +12 -0
  27. data/app/assets/javascripts/generators/ruby.js.coffee.erb +188 -0
  28. data/app/assets/javascripts/models/.keep +0 -0
  29. data/app/assets/javascripts/models/character.js.coffee +66 -0
  30. data/app/assets/javascripts/models/scene.js.coffee +5 -0
  31. data/app/assets/javascripts/models/source_code.js.coffee +64 -0
  32. data/app/assets/javascripts/routers/.keep +0 -0
  33. data/app/assets/javascripts/ruby_mode.js.coffee.erb +12 -0
  34. data/app/assets/javascripts/smalruby.js.coffee +97 -0
  35. data/app/assets/javascripts/views/.keep +0 -0
  36. data/app/assets/javascripts/views/character_modal_view.js.coffee +148 -0
  37. data/app/assets/javascripts/views/character_selector_view.js.coffee +109 -0
  38. data/app/assets/javascripts/views/main_menu_view.js.coffee +264 -0
  39. data/app/assets/stylesheets/editor.css.scss +318 -2
  40. data/app/assets/stylesheets/toolbox.css.scss.erb +62 -0
  41. data/app/assets/templates/.keep +0 -0
  42. data/app/controllers/application_controller.rb +19 -0
  43. data/app/controllers/editor_controller.rb +4 -0
  44. data/app/controllers/source_codes_controller.rb +8 -2
  45. data/app/helpers/application_helper.rb +1 -0
  46. data/app/helpers/editor_helper.rb +46 -0
  47. data/app/models/source_code.rb +49 -6
  48. data/app/views/editor/_block_tab.html.haml +53 -0
  49. data/app/views/editor/_character_modal.html.haml +53 -0
  50. data/app/views/editor/_toolbox.html.haml +384 -0
  51. data/app/views/editor/demo.html.erb +16 -0
  52. data/app/views/editor/index.html.haml +60 -0
  53. data/app/views/layouts/application.html.erb +7 -0
  54. data/config/application.rb +1 -0
  55. data/config/initializers/teaspoon.rb +79 -0
  56. data/config/routes.rb +4 -0
  57. data/lib/smalruby_editor/version.rb +1 -1
  58. data/lib/tasks/gem.rake +7 -4
  59. data/lib/tasks/release.rake +43 -0
  60. data/public/apple-touch-icon.png +0 -0
  61. data/public/blockly/media/1x1.gif +0 -0
  62. data/public/blockly/media/click.mp3 +0 -0
  63. data/public/blockly/media/click.ogg +0 -0
  64. data/public/blockly/media/click.wav +0 -0
  65. data/public/blockly/media/delete.mp3 +0 -0
  66. data/public/blockly/media/delete.ogg +0 -0
  67. data/public/blockly/media/delete.wav +0 -0
  68. data/public/blockly/media/handclosed.cur +0 -0
  69. data/public/blockly/media/handopen.cur +0 -0
  70. data/public/blockly/media/quote0.png +0 -0
  71. data/public/blockly/media/quote1.png +0 -0
  72. data/public/blockly/media/trashbody.png +0 -0
  73. data/public/blockly/media/trashlid.png +0 -0
  74. data/public/blockly/media/tree.png +0 -0
  75. data/public/browserconfig.xml +1 -0
  76. data/public/large.png +0 -0
  77. data/public/smalruby/assets/ball1.png +0 -0
  78. data/public/smalruby/assets/ball2.png +0 -0
  79. data/public/smalruby/assets/ball3.png +0 -0
  80. data/public/smalruby/assets/ball4.png +0 -0
  81. data/public/smalruby/assets/ball5.png +0 -0
  82. data/public/smalruby/assets/ball6.png +0 -0
  83. data/public/smalruby/assets/car1.png +0 -0
  84. data/public/smalruby/assets/car2.png +0 -0
  85. data/public/smalruby/assets/car3.png +0 -0
  86. data/public/smalruby/assets/car4.png +0 -0
  87. data/public/smalruby/assets/cat1.png +0 -0
  88. data/public/smalruby/assets/cat2.png +0 -0
  89. data/public/smalruby/assets/cat3.png +0 -0
  90. data/public/smalruby/assets/frog1.png +0 -0
  91. data/public/smalruby/assets/piano_do.wav +0 -0
  92. data/public/smalruby/assets/piano_do_2.wav +0 -0
  93. data/public/smalruby/assets/piano_fa.wav +0 -0
  94. data/public/smalruby/assets/piano_mi.wav +0 -0
  95. data/public/smalruby/assets/piano_ra.wav +0 -0
  96. data/public/smalruby/assets/piano_re.wav +0 -0
  97. data/public/smalruby/assets/piano_si.wav +0 -0
  98. data/public/smalruby/assets/piano_so.wav +0 -0
  99. data/public/square.png +0 -0
  100. data/public/tiny.png +0 -0
  101. data/public/wide.png +0 -0
  102. data/smalruby-editor.gemspec +4 -0
  103. data/spec/acceptance/block_mode/blocks/character/new.feature +136 -0
  104. data/spec/acceptance/block_mode/blocks/control/await.feature +20 -0
  105. data/spec/acceptance/block_mode/blocks/control/await_until.feature +39 -0
  106. data/spec/acceptance/block_mode/blocks/control/break.feature +20 -0
  107. data/spec/acceptance/block_mode/blocks/control/if.feature +68 -0
  108. data/spec/acceptance/block_mode/blocks/control/if_else.feature +78 -0
  109. data/spec/acceptance/block_mode/blocks/control/loop.feature +45 -0
  110. data/spec/acceptance/block_mode/blocks/control/next.feature +20 -0
  111. data/spec/acceptance/block_mode/blocks/control/redo.feature +20 -0
  112. data/spec/acceptance/block_mode/blocks/control/sleep.feature +41 -0
  113. data/spec/acceptance/block_mode/blocks/control/times.feature +72 -0
  114. data/spec/acceptance/block_mode/blocks/control/until.feature +68 -0
  115. data/spec/acceptance/block_mode/blocks/events/on_click.feature +75 -0
  116. data/spec/acceptance/block_mode/blocks/events/on_hit.feature +83 -0
  117. data/spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature +171 -0
  118. data/spec/acceptance/block_mode/blocks/events/on_start.feature +75 -0
  119. data/spec/acceptance/block_mode/blocks/hardware/init_hardware.feature +44 -0
  120. data/spec/acceptance/block_mode/blocks/hardware/led_off.feature +75 -0
  121. data/spec/acceptance/block_mode/blocks/hardware/led_on.feature +75 -0
  122. data/spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature +81 -0
  123. data/spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature +81 -0
  124. data/spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature +87 -0
  125. data/spec/acceptance/block_mode/blocks/hardware/sensor_value.feature +100 -0
  126. data/spec/acceptance/block_mode/blocks/looks/hide.feature +69 -0
  127. data/spec/acceptance/block_mode/blocks/looks/say.feature +106 -0
  128. data/spec/acceptance/block_mode/blocks/looks/show.feature +69 -0
  129. data/spec/acceptance/block_mode/blocks/looks/vanish.feature +69 -0
  130. data/spec/acceptance/block_mode/blocks/motion/change_x_by.feature +81 -0
  131. data/spec/acceptance/block_mode/blocks/motion/change_y_by.feature +81 -0
  132. data/spec/acceptance/block_mode/blocks/motion/move.feature +81 -0
  133. data/spec/acceptance/block_mode/blocks/motion/reach_wall.feature +98 -0
  134. data/spec/acceptance/block_mode/blocks/motion/rotate_left.feature +81 -0
  135. data/spec/acceptance/block_mode/blocks/motion/rotate_right.feature +81 -0
  136. data/spec/acceptance/block_mode/blocks/motion/self_angle.feature +92 -0
  137. data/spec/acceptance/block_mode/blocks/motion/self_x.feature +92 -0
  138. data/spec/acceptance/block_mode/blocks/motion/self_y.feature +92 -0
  139. data/spec/acceptance/block_mode/blocks/motion/set_angle.feature +81 -0
  140. data/spec/acceptance/block_mode/blocks/motion/set_x.feature +81 -0
  141. data/spec/acceptance/block_mode/blocks/motion/set_x_y.feature +95 -0
  142. data/spec/acceptance/block_mode/blocks/motion/set_y.feature +81 -0
  143. data/spec/acceptance/block_mode/blocks/motion/turn.feature +69 -0
  144. data/spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature +69 -0
  145. data/spec/acceptance/block_mode/blocks/sensing/character_property.feature +114 -0
  146. data/spec/acceptance/block_mode/blocks/sensing/hit.feature +110 -0
  147. data/spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature +91 -0
  148. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature +39 -0
  149. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature +39 -0
  150. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature +91 -0
  151. data/spec/acceptance/block_mode/blocks/sensing/time_now.feature +43 -0
  152. data/spec/acceptance/block_mode/blocks/sound/play.feature +81 -0
  153. data/spec/acceptance/block_mode/demo.feature +49 -0
  154. data/spec/acceptance/{text_editor → ruby_mode}/base.feature +11 -2
  155. data/spec/acceptance/{standalone → ruby_mode}/check.feature +8 -9
  156. data/spec/acceptance/ruby_mode/download.feature +33 -0
  157. data/spec/acceptance/{text_editor → ruby_mode}/load.feature +13 -13
  158. data/spec/acceptance/standalone/run.feature +17 -0
  159. data/spec/acceptance/standalone/save.feature +6 -6
  160. data/spec/helpers/editor_helper_spec.rb +110 -10
  161. data/spec/javascripts/collections/character_set_spec.coffee +41 -0
  162. data/spec/javascripts/models/character_spec.coffee +146 -0
  163. data/spec/javascripts/models/scene_spec.coffee +15 -0
  164. data/spec/javascripts/spec_helper.js +29 -0
  165. data/spec/spec_helper.rb +3 -8
  166. data/spec/steps/block_mode_steps.rb +37 -0
  167. data/spec/steps/global_variable.rb +30 -6
  168. data/spec/steps/text_editor_steps.rb +20 -2
  169. data/spec/teaspoon_env.rb +46 -0
  170. data/vendor/assets/javascripts/blockly/blockly_compressed.js +992 -0
  171. data/vendor/assets/javascripts/blockly/blocks_compressed.js +129 -0
  172. data/vendor/assets/javascripts/blockly/msg/js/ja.js +377 -0
  173. data/vendor/assets/javascripts/jquery.blockUI.js +619 -0
  174. metadata +290 -23
  175. data/app/assets/javascripts/editor.js.coffee.erb +0 -137
  176. data/app/views/editor/index.html.erb +0 -22
  177. data/spec/acceptance/text_editor/check.feature +0 -29
  178. data/spec/acceptance/text_editor/save.feature +0 -34
  179. data/spec/support/assets.rb +0 -18
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smalruby-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouji Takao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,62 @@ dependencies:
206
206
  - - ~>
207
207
  - !ruby/object:Gem::Version
208
208
  version: '1.16'
209
+ - !ruby/object:Gem::Dependency
210
+ name: haml-rails
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: jquery-ui-rails
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - '>='
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: backbone-on-rails
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - '>='
249
+ - !ruby/object:Gem::Version
250
+ version: '0'
251
+ - !ruby/object:Gem::Dependency
252
+ name: smalruby
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - '>='
263
+ - !ruby/object:Gem::Version
264
+ version: '0'
209
265
  - !ruby/object:Gem::Dependency
210
266
  name: therubyracer
211
267
  requirement: !ruby/object:Gem::Requirement
@@ -271,13 +327,45 @@ files:
271
327
  - Procfile
272
328
  - README.rdoc
273
329
  - Rakefile
330
+ - app/assets/demos/default.xml
331
+ - app/assets/demos/rgb_led_anode.xml
274
332
  - app/assets/images/.keep
275
333
  - app/assets/images/favicon.ico
276
334
  - app/assets/javascripts/application.js
277
- - app/assets/javascripts/editor.js.coffee.erb
335
+ - app/assets/javascripts/block_mode.js.coffee.erb
336
+ - app/assets/javascripts/blocks/blockly.js.coffee.erb
337
+ - app/assets/javascripts/blocks/character.js.coffee.erb
338
+ - app/assets/javascripts/blocks/control.js.coffee.erb
339
+ - app/assets/javascripts/blocks/data.js.coffee.erb
340
+ - app/assets/javascripts/blocks/etc.js.coffee.erb
341
+ - app/assets/javascripts/blocks/events.js.coffee.erb
342
+ - app/assets/javascripts/blocks/hardware.js.coffee.erb
343
+ - app/assets/javascripts/blocks/looks.js.coffee.erb
344
+ - app/assets/javascripts/blocks/motion.js.coffee.erb
345
+ - app/assets/javascripts/blocks/operators.js.coffee.erb
346
+ - app/assets/javascripts/blocks/pen.js.coffee.erb
347
+ - app/assets/javascripts/blocks/ruby.js.coffee.erb
348
+ - app/assets/javascripts/blocks/sensing.js.coffee.erb
349
+ - app/assets/javascripts/blocks/sound.js.coffee.erb
350
+ - app/assets/javascripts/collections/.keep
351
+ - app/assets/javascripts/collections/character_set.js.coffee
352
+ - app/assets/javascripts/generators/ruby.js.coffee.erb
353
+ - app/assets/javascripts/models/.keep
354
+ - app/assets/javascripts/models/character.js.coffee
355
+ - app/assets/javascripts/models/scene.js.coffee
356
+ - app/assets/javascripts/models/source_code.js.coffee
357
+ - app/assets/javascripts/routers/.keep
358
+ - app/assets/javascripts/ruby_mode.js.coffee.erb
359
+ - app/assets/javascripts/smalruby.js.coffee
360
+ - app/assets/javascripts/views/.keep
361
+ - app/assets/javascripts/views/character_modal_view.js.coffee
362
+ - app/assets/javascripts/views/character_selector_view.js.coffee
363
+ - app/assets/javascripts/views/main_menu_view.js.coffee
278
364
  - app/assets/stylesheets/application.css
279
365
  - app/assets/stylesheets/editor.css.scss
280
366
  - app/assets/stylesheets/flatstrap-custom.css.scss
367
+ - app/assets/stylesheets/toolbox.css.scss.erb
368
+ - app/assets/templates/.keep
281
369
  - app/controllers/application_controller.rb
282
370
  - app/controllers/concerns/.keep
283
371
  - app/controllers/editor_controller.rb
@@ -288,7 +376,11 @@ files:
288
376
  - app/models/.keep
289
377
  - app/models/concerns/.keep
290
378
  - app/models/source_code.rb
291
- - app/views/editor/index.html.erb
379
+ - app/views/editor/_block_tab.html.haml
380
+ - app/views/editor/_character_modal.html.haml
381
+ - app/views/editor/_toolbox.html.haml
382
+ - app/views/editor/demo.html.erb
383
+ - app/views/editor/index.html.haml
292
384
  - app/views/layouts/application.html.erb
293
385
  - bin/bundle
294
386
  - bin/rails
@@ -311,6 +403,7 @@ files:
311
403
  - config/initializers/mime_types.rb
312
404
  - config/initializers/secret_token.rb
313
405
  - config/initializers/session_store.rb
406
+ - config/initializers/teaspoon.rb
314
407
  - config/initializers/wrap_parameters.rb
315
408
  - config/locales/en.yml
316
409
  - config/routes.rb
@@ -324,51 +417,169 @@ files:
324
417
  - lib/smalruby_editor/version.rb
325
418
  - lib/tasks/.keep
326
419
  - lib/tasks/gem.rake
420
+ - lib/tasks/release.rake
327
421
  - lib/tasks/rspec.rake
328
422
  - lib/tasks/rubocop.rake
329
423
  - log/.keep
330
424
  - public/404.html
331
425
  - public/422.html
332
426
  - public/500.html
333
- - public/favicon.ico
427
+ - public/apple-touch-icon.png
428
+ - public/blockly/media/1x1.gif
429
+ - public/blockly/media/click.mp3
430
+ - public/blockly/media/click.ogg
431
+ - public/blockly/media/click.wav
432
+ - public/blockly/media/delete.mp3
433
+ - public/blockly/media/delete.ogg
434
+ - public/blockly/media/delete.wav
435
+ - public/blockly/media/handclosed.cur
436
+ - public/blockly/media/handopen.cur
437
+ - public/blockly/media/quote0.png
438
+ - public/blockly/media/quote1.png
439
+ - public/blockly/media/trashbody.png
440
+ - public/blockly/media/trashlid.png
441
+ - public/blockly/media/tree.png
442
+ - public/browserconfig.xml
334
443
  - public/fonts/FontAwesome.otf
335
444
  - public/fonts/fontawesome-webfont.eot
336
445
  - public/fonts/fontawesome-webfont.ttf
337
446
  - public/fonts/fontawesome-webfont.woff
447
+ - public/large.png
338
448
  - public/robots.txt
449
+ - public/smalruby/assets/ball1.png
450
+ - public/smalruby/assets/ball2.png
451
+ - public/smalruby/assets/ball3.png
452
+ - public/smalruby/assets/ball4.png
453
+ - public/smalruby/assets/ball5.png
454
+ - public/smalruby/assets/ball6.png
455
+ - public/smalruby/assets/car1.png
456
+ - public/smalruby/assets/car2.png
457
+ - public/smalruby/assets/car3.png
458
+ - public/smalruby/assets/car4.png
459
+ - public/smalruby/assets/cat1.png
460
+ - public/smalruby/assets/cat2.png
461
+ - public/smalruby/assets/cat3.png
462
+ - public/smalruby/assets/frog1.png
463
+ - public/smalruby/assets/piano_do.wav
464
+ - public/smalruby/assets/piano_do_2.wav
465
+ - public/smalruby/assets/piano_fa.wav
466
+ - public/smalruby/assets/piano_mi.wav
467
+ - public/smalruby/assets/piano_ra.wav
468
+ - public/smalruby/assets/piano_re.wav
469
+ - public/smalruby/assets/piano_si.wav
470
+ - public/smalruby/assets/piano_so.wav
471
+ - public/square.png
472
+ - public/tiny.png
473
+ - public/wide.png
339
474
  - smalruby-editor.gemspec
475
+ - spec/acceptance/block_mode/blocks/character/new.feature
476
+ - spec/acceptance/block_mode/blocks/control/await.feature
477
+ - spec/acceptance/block_mode/blocks/control/await_until.feature
478
+ - spec/acceptance/block_mode/blocks/control/break.feature
479
+ - spec/acceptance/block_mode/blocks/control/if.feature
480
+ - spec/acceptance/block_mode/blocks/control/if_else.feature
481
+ - spec/acceptance/block_mode/blocks/control/loop.feature
482
+ - spec/acceptance/block_mode/blocks/control/next.feature
483
+ - spec/acceptance/block_mode/blocks/control/redo.feature
484
+ - spec/acceptance/block_mode/blocks/control/sleep.feature
485
+ - spec/acceptance/block_mode/blocks/control/times.feature
486
+ - spec/acceptance/block_mode/blocks/control/until.feature
487
+ - spec/acceptance/block_mode/blocks/events/on_click.feature
488
+ - spec/acceptance/block_mode/blocks/events/on_hit.feature
489
+ - spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature
490
+ - spec/acceptance/block_mode/blocks/events/on_start.feature
491
+ - spec/acceptance/block_mode/blocks/hardware/init_hardware.feature
492
+ - spec/acceptance/block_mode/blocks/hardware/led_off.feature
493
+ - spec/acceptance/block_mode/blocks/hardware/led_on.feature
494
+ - spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature
495
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature
496
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature
497
+ - spec/acceptance/block_mode/blocks/hardware/sensor_value.feature
498
+ - spec/acceptance/block_mode/blocks/looks/hide.feature
499
+ - spec/acceptance/block_mode/blocks/looks/say.feature
500
+ - spec/acceptance/block_mode/blocks/looks/show.feature
501
+ - spec/acceptance/block_mode/blocks/looks/vanish.feature
502
+ - spec/acceptance/block_mode/blocks/motion/change_x_by.feature
503
+ - spec/acceptance/block_mode/blocks/motion/change_y_by.feature
504
+ - spec/acceptance/block_mode/blocks/motion/move.feature
505
+ - spec/acceptance/block_mode/blocks/motion/reach_wall.feature
506
+ - spec/acceptance/block_mode/blocks/motion/rotate_left.feature
507
+ - spec/acceptance/block_mode/blocks/motion/rotate_right.feature
508
+ - spec/acceptance/block_mode/blocks/motion/self_angle.feature
509
+ - spec/acceptance/block_mode/blocks/motion/self_x.feature
510
+ - spec/acceptance/block_mode/blocks/motion/self_y.feature
511
+ - spec/acceptance/block_mode/blocks/motion/set_angle.feature
512
+ - spec/acceptance/block_mode/blocks/motion/set_x.feature
513
+ - spec/acceptance/block_mode/blocks/motion/set_x_y.feature
514
+ - spec/acceptance/block_mode/blocks/motion/set_y.feature
515
+ - spec/acceptance/block_mode/blocks/motion/turn.feature
516
+ - spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature
517
+ - spec/acceptance/block_mode/blocks/sensing/character_property.feature
518
+ - spec/acceptance/block_mode/blocks/sensing/hit.feature
519
+ - spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature
520
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature
521
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature
522
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature
523
+ - spec/acceptance/block_mode/blocks/sensing/time_now.feature
524
+ - spec/acceptance/block_mode/blocks/sound/play.feature
525
+ - spec/acceptance/block_mode/demo.feature
340
526
  - spec/acceptance/readme.md
341
- - spec/acceptance/standalone/check.feature
527
+ - spec/acceptance/ruby_mode/base.feature
528
+ - spec/acceptance/ruby_mode/check.feature
529
+ - spec/acceptance/ruby_mode/download.feature
530
+ - spec/acceptance/ruby_mode/load.feature
531
+ - spec/acceptance/standalone/run.feature
342
532
  - spec/acceptance/standalone/save.feature
343
- - spec/acceptance/text_editor/base.feature
344
- - spec/acceptance/text_editor/check.feature
345
- - spec/acceptance/text_editor/load.feature
346
- - spec/acceptance/text_editor/save.feature
347
533
  - spec/controllers/editor_controller_spec.rb
348
534
  - spec/controllers/source_codes_controller_spec.rb
349
535
  - spec/fixtures/files/01.rb
350
536
  - spec/fixtures/files/favicon.ico
351
537
  - spec/helpers/editor_helper_spec.rb
538
+ - spec/javascripts/collections/character_set_spec.coffee
539
+ - spec/javascripts/models/character_spec.coffee
540
+ - spec/javascripts/models/scene_spec.coffee
541
+ - spec/javascripts/spec_helper.js
352
542
  - spec/lib/smalruby_editor_spec.rb
353
543
  - spec/models/source_code_spec.rb
354
544
  - spec/spec_helper.rb
355
545
  - spec/steps/ace_steps.rb
546
+ - spec/steps/block_mode_steps.rb
356
547
  - spec/steps/global_variable.rb
357
548
  - spec/steps/text_editor_steps.rb
358
- - spec/support/assets.rb
359
549
  - spec/support/capybara.rb
360
550
  - spec/support/env.rb
551
+ - spec/teaspoon_env.rb
361
552
  - spec/turnip_helper.rb
362
553
  - vendor/assets/javascripts/.keep
554
+ - vendor/assets/javascripts/blockly/blockly_compressed.js
555
+ - vendor/assets/javascripts/blockly/blocks_compressed.js
556
+ - vendor/assets/javascripts/blockly/msg/js/ja.js
557
+ - vendor/assets/javascripts/jquery.blockUI.js
363
558
  - vendor/assets/stylesheets/.keep
364
- - public/assets/application-ba0c47b4699119d7c75b88c4eef30e9a.js
365
- - public/assets/application-ba0c47b4699119d7c75b88c4eef30e9a.js.gz
366
- - public/assets/application-f51ea0e777d97f12a8ce84308f31eb57.css
367
- - public/assets/application-f51ea0e777d97f12a8ce84308f31eb57.css.gz
368
- - public/assets/favicon-c7ae857bb9d06de8742ae2d337157e83.ico
559
+ - public/assets/application-0c2ae32cd8822cec7ba6e445e2501010.js
560
+ - public/assets/application-0c2ae32cd8822cec7ba6e445e2501010.js.gz
561
+ - public/assets/application-0e1a6c238c0cc501b29746e5db35b5a1.css
562
+ - public/assets/application-0e1a6c238c0cc501b29746e5db35b5a1.css.gz
563
+ - public/assets/default-7f438ebd7f8ab6ef65c5b9744786e57f.xml
564
+ - public/assets/favicon-a37c90b368fd8ed436cb8f9e9396465c.ico
565
+ - public/assets/jquery-ui/animated-overlay-c48c87b7a95316f4698484e3b85ee4aa.gif
566
+ - public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-58b63faadd031ca3db096dfdffd90224.png
567
+ - public/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100-937399e8b369d64aa075d13a82c00112.png
568
+ - public/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400-a8c503e0f42a081a92a473b0d30ac6cf.png
569
+ - public/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400-ddcbfe385abc3947937caa0b44e2f5d2.png
570
+ - public/assets/jquery-ui/ui-bg_glass_75_dadada_1x400-14dd4a9ad1f21d8c4c7e673ddfb0806f.png
571
+ - public/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400-a43dfabb23b0a987b567b282bad68346.png
572
+ - public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-31c0c791a756266043ee8ea61dacb36a.png
573
+ - public/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100-33edbdb0d2fcebd2a65c2041a28533da.png
574
+ - public/assets/jquery-ui/ui-icons_222222_256x240-890385424135de1513f00cbecfb7f990.png
575
+ - public/assets/jquery-ui/ui-icons_2e83ff_256x240-824705ca4aa2610434a358fe4018c9c6.png
576
+ - public/assets/jquery-ui/ui-icons_454545_256x240-254e054f6df453dfac49efbc8b78f79d.png
577
+ - public/assets/jquery-ui/ui-icons_888888_256x240-57c441f87c4289a5372823f506c1182d.png
578
+ - public/assets/jquery-ui/ui-icons_cd0a0a_256x240-261647ac915575f3981ded254ae8d43e.png
369
579
  - public/assets/loading-e8e6dd7833131c92a6c3b9c8ccc6a6ac.gif
370
- - public/assets/manifest-3bcabf5c85a81c33c1c52b6bf869bb16.json
580
+ - public/assets/manifest-1f254fa92a71ba4faad0f99136daeed8.json
371
581
  - public/assets/progressbar-82023a146fba2a0f6d925629ed2b09c5.gif
582
+ - public/assets/rgb_led_anode-91225bef2a8b97f1cefee862a0619b91.xml
372
583
  homepage: https://github.com/smalruby/smalruby-editor
373
584
  licenses:
374
585
  - MIT
@@ -399,25 +610,81 @@ signing_key:
399
610
  specification_version: 4
400
611
  summary: A visual programming editor.
401
612
  test_files:
613
+ - spec/acceptance/block_mode/blocks/character/new.feature
614
+ - spec/acceptance/block_mode/blocks/control/await.feature
615
+ - spec/acceptance/block_mode/blocks/control/await_until.feature
616
+ - spec/acceptance/block_mode/blocks/control/break.feature
617
+ - spec/acceptance/block_mode/blocks/control/if.feature
618
+ - spec/acceptance/block_mode/blocks/control/if_else.feature
619
+ - spec/acceptance/block_mode/blocks/control/loop.feature
620
+ - spec/acceptance/block_mode/blocks/control/next.feature
621
+ - spec/acceptance/block_mode/blocks/control/redo.feature
622
+ - spec/acceptance/block_mode/blocks/control/sleep.feature
623
+ - spec/acceptance/block_mode/blocks/control/times.feature
624
+ - spec/acceptance/block_mode/blocks/control/until.feature
625
+ - spec/acceptance/block_mode/blocks/events/on_click.feature
626
+ - spec/acceptance/block_mode/blocks/events/on_hit.feature
627
+ - spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature
628
+ - spec/acceptance/block_mode/blocks/events/on_start.feature
629
+ - spec/acceptance/block_mode/blocks/hardware/init_hardware.feature
630
+ - spec/acceptance/block_mode/blocks/hardware/led_off.feature
631
+ - spec/acceptance/block_mode/blocks/hardware/led_on.feature
632
+ - spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature
633
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature
634
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature
635
+ - spec/acceptance/block_mode/blocks/hardware/sensor_value.feature
636
+ - spec/acceptance/block_mode/blocks/looks/hide.feature
637
+ - spec/acceptance/block_mode/blocks/looks/say.feature
638
+ - spec/acceptance/block_mode/blocks/looks/show.feature
639
+ - spec/acceptance/block_mode/blocks/looks/vanish.feature
640
+ - spec/acceptance/block_mode/blocks/motion/change_x_by.feature
641
+ - spec/acceptance/block_mode/blocks/motion/change_y_by.feature
642
+ - spec/acceptance/block_mode/blocks/motion/move.feature
643
+ - spec/acceptance/block_mode/blocks/motion/reach_wall.feature
644
+ - spec/acceptance/block_mode/blocks/motion/rotate_left.feature
645
+ - spec/acceptance/block_mode/blocks/motion/rotate_right.feature
646
+ - spec/acceptance/block_mode/blocks/motion/self_angle.feature
647
+ - spec/acceptance/block_mode/blocks/motion/self_x.feature
648
+ - spec/acceptance/block_mode/blocks/motion/self_y.feature
649
+ - spec/acceptance/block_mode/blocks/motion/set_angle.feature
650
+ - spec/acceptance/block_mode/blocks/motion/set_x.feature
651
+ - spec/acceptance/block_mode/blocks/motion/set_x_y.feature
652
+ - spec/acceptance/block_mode/blocks/motion/set_y.feature
653
+ - spec/acceptance/block_mode/blocks/motion/turn.feature
654
+ - spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature
655
+ - spec/acceptance/block_mode/blocks/sensing/character_property.feature
656
+ - spec/acceptance/block_mode/blocks/sensing/hit.feature
657
+ - spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature
658
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature
659
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature
660
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature
661
+ - spec/acceptance/block_mode/blocks/sensing/time_now.feature
662
+ - spec/acceptance/block_mode/blocks/sound/play.feature
663
+ - spec/acceptance/block_mode/demo.feature
402
664
  - spec/acceptance/readme.md
403
- - spec/acceptance/standalone/check.feature
665
+ - spec/acceptance/ruby_mode/base.feature
666
+ - spec/acceptance/ruby_mode/check.feature
667
+ - spec/acceptance/ruby_mode/download.feature
668
+ - spec/acceptance/ruby_mode/load.feature
669
+ - spec/acceptance/standalone/run.feature
404
670
  - spec/acceptance/standalone/save.feature
405
- - spec/acceptance/text_editor/base.feature
406
- - spec/acceptance/text_editor/check.feature
407
- - spec/acceptance/text_editor/load.feature
408
- - spec/acceptance/text_editor/save.feature
409
671
  - spec/controllers/editor_controller_spec.rb
410
672
  - spec/controllers/source_codes_controller_spec.rb
411
673
  - spec/fixtures/files/01.rb
412
674
  - spec/fixtures/files/favicon.ico
413
675
  - spec/helpers/editor_helper_spec.rb
676
+ - spec/javascripts/collections/character_set_spec.coffee
677
+ - spec/javascripts/models/character_spec.coffee
678
+ - spec/javascripts/models/scene_spec.coffee
679
+ - spec/javascripts/spec_helper.js
414
680
  - spec/lib/smalruby_editor_spec.rb
415
681
  - spec/models/source_code_spec.rb
416
682
  - spec/spec_helper.rb
417
683
  - spec/steps/ace_steps.rb
684
+ - spec/steps/block_mode_steps.rb
418
685
  - spec/steps/global_variable.rb
419
686
  - spec/steps/text_editor_steps.rb
420
- - spec/support/assets.rb
421
687
  - spec/support/capybara.rb
422
688
  - spec/support/env.rb
689
+ - spec/teaspoon_env.rb
423
690
  - spec/turnip_helper.rb
@@ -1,137 +0,0 @@
1
- # Place all the behaviors and hooks related to the matching controller here.
2
- # All this logic will automatically be available in application.js.
3
- # You can use CoffeeScript in this file: http://coffeescript.org/
4
-
5
- changed = false
6
-
7
- successMessage = (title, msg = '', selector = '#messages') ->
8
- html = $('<div class="alert alert-success" style="display: none">')
9
- .append("<h4><i class=\"icon-star\"></i>#{title}</h4>")
10
- .append(msg)
11
- $(selector).append(html)
12
- html.fadeIn('slow')
13
- .delay(3000)
14
- .fadeOut('slow')
15
-
16
- errorMessage = (msg, selector = '#messages') ->
17
- html = $('<div class="alert alert-error" style="display: none">')
18
- .append('<button type="button" class="close" data-dismiss="alert">×</button>')
19
- .append('<h4><i class="icon-exclamation-sign"></i>エラー</h4>')
20
- .append(msg)
21
- $(selector).append(html)
22
- html.fadeIn('slow')
23
-
24
- $ ->
25
- saving = false
26
-
27
- textEditor = ace.edit('text-editor')
28
- textEditor.setTheme('ace/theme/clouds')
29
- textEditor.setShowInvisibles(true)
30
-
31
- textEditor.focus()
32
- textEditor.gotoLine(0, 0)
33
-
34
- textEditor.on 'change', (e) ->
35
- changed = true
36
-
37
- session = textEditor.getSession()
38
- session.setMode('ace/mode/ruby')
39
- session.setTabSize(2)
40
- session.setUseSoftTabs(true)
41
-
42
- $('#save-button').click (e) ->
43
- e.preventDefault()
44
- filename = $.trim($('#filename').val())
45
- if filename.length <= 0
46
- errorMessage('セーブする前にプログラムに名前をつけてね!')
47
- $('#filename').focus()
48
- else
49
- afterSave = ->
50
- changed = false
51
- successMessage('セーブしました')
52
-
53
- $.ajax
54
- url: '/source_codes/check'
55
- type: 'POST'
56
- data:
57
- source_code:
58
- data: session.getDocument().getValue()
59
- dataType: 'json'
60
- success: (data, textStatus, jqXHR) ->
61
- if data.length == 0
62
- successMessage('チェックしました', 'ただし、プログラムを動かすとエラーが見つかるかもしれません。')
63
- else
64
- for errorInfo in data
65
- do (errorInfo) ->
66
- msg = "#{errorInfo.row}行"
67
- if errorInfo.column > 0
68
- msg += "、#{errorInfo.column}文字"
69
- errorMessage(msg + ": #{errorInfo.message}")
70
-
71
- $.ajax
72
- url: '/source_codes/'
73
- type: 'POST'
74
- data:
75
- source_code:
76
- filename: filename
77
- data: session.getDocument().getValue()
78
- dataType: 'json'
79
- success: (data, textStatus, jqXHR) ->
80
- <% if Rails.env == 'standalone' %>
81
- $.ajax
82
- url: '/source_codes/write'
83
- type: 'DELETE'
84
- dataType: 'json'
85
- success: (data, textStatus, jqXHR) ->
86
- if data.source_code.error
87
- if confirm("前に#{filename}という名前でセーブしているけど本当にセーブしますか?\nセーブすると前に作成したプログラムは消えてしまうよ!")
88
- $.ajax
89
- url: '/source_codes/write?force=1'
90
- type: 'DELETE'
91
- dataType: 'json'
92
- success: (data, textStatus, jqXHR) ->
93
- afterSave()
94
- else
95
- successMessage('セーブをキャンセルしました')
96
- else
97
- afterSave()
98
- <% else %>
99
- afterSave()
100
- saving = true
101
- $('#download-link').click()
102
- <% end %>
103
-
104
- $('#filename').keypress (e) ->
105
- e = window.event if !e
106
- if e.keyCode == 13
107
- $('#save-button').click()
108
- false
109
- else
110
- true
111
-
112
- $('#load-button').click (e) ->
113
- e.preventDefault()
114
- if changed
115
- return unless confirm('まだセーブしていないのでロードするとプログラムが消えてしまうよ!\nそれでもロードしますか?')
116
- $(@).parent().find('input[name="source_code[file]"]').click()
117
-
118
- $('#file-form').fileupload
119
- dataType: 'json'
120
- done: (e, data) ->
121
- info = data.result.source_code
122
- if info.error
123
- errorMessage(info.filename + 'は' + info.error)
124
- else
125
- $('#filename').val(info.filename)
126
- session.getDocument().setValue(info.data)
127
- textEditor.focus()
128
- textEditor.moveCursorTo(0, 0)
129
- changed = false
130
- successMessage('ロードしました')
131
-
132
- window.onbeforeunload = (event) ->
133
- if !saving && session.getDocument().getValue().length > 0
134
- return '作成中のプログラムが消えてしまうよ!'
135
- else
136
- saving = false
137
- return