smalruby-editor 0.0.12-x86-mingw32 → 0.1.0-x86-mingw32

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: x86-mingw32
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: bundler
211
267
  requirement: !ruby/object:Gem::Requirement
@@ -257,13 +313,45 @@ files:
257
313
  - Procfile
258
314
  - README.rdoc
259
315
  - Rakefile
316
+ - app/assets/demos/default.xml
317
+ - app/assets/demos/rgb_led_anode.xml
260
318
  - app/assets/images/.keep
261
319
  - app/assets/images/favicon.ico
262
320
  - app/assets/javascripts/application.js
263
- - app/assets/javascripts/editor.js.coffee.erb
321
+ - app/assets/javascripts/block_mode.js.coffee.erb
322
+ - app/assets/javascripts/blocks/blockly.js.coffee.erb
323
+ - app/assets/javascripts/blocks/character.js.coffee.erb
324
+ - app/assets/javascripts/blocks/control.js.coffee.erb
325
+ - app/assets/javascripts/blocks/data.js.coffee.erb
326
+ - app/assets/javascripts/blocks/etc.js.coffee.erb
327
+ - app/assets/javascripts/blocks/events.js.coffee.erb
328
+ - app/assets/javascripts/blocks/hardware.js.coffee.erb
329
+ - app/assets/javascripts/blocks/looks.js.coffee.erb
330
+ - app/assets/javascripts/blocks/motion.js.coffee.erb
331
+ - app/assets/javascripts/blocks/operators.js.coffee.erb
332
+ - app/assets/javascripts/blocks/pen.js.coffee.erb
333
+ - app/assets/javascripts/blocks/ruby.js.coffee.erb
334
+ - app/assets/javascripts/blocks/sensing.js.coffee.erb
335
+ - app/assets/javascripts/blocks/sound.js.coffee.erb
336
+ - app/assets/javascripts/collections/.keep
337
+ - app/assets/javascripts/collections/character_set.js.coffee
338
+ - app/assets/javascripts/generators/ruby.js.coffee.erb
339
+ - app/assets/javascripts/models/.keep
340
+ - app/assets/javascripts/models/character.js.coffee
341
+ - app/assets/javascripts/models/scene.js.coffee
342
+ - app/assets/javascripts/models/source_code.js.coffee
343
+ - app/assets/javascripts/routers/.keep
344
+ - app/assets/javascripts/ruby_mode.js.coffee.erb
345
+ - app/assets/javascripts/smalruby.js.coffee
346
+ - app/assets/javascripts/views/.keep
347
+ - app/assets/javascripts/views/character_modal_view.js.coffee
348
+ - app/assets/javascripts/views/character_selector_view.js.coffee
349
+ - app/assets/javascripts/views/main_menu_view.js.coffee
264
350
  - app/assets/stylesheets/application.css
265
351
  - app/assets/stylesheets/editor.css.scss
266
352
  - app/assets/stylesheets/flatstrap-custom.css.scss
353
+ - app/assets/stylesheets/toolbox.css.scss.erb
354
+ - app/assets/templates/.keep
267
355
  - app/controllers/application_controller.rb
268
356
  - app/controllers/concerns/.keep
269
357
  - app/controllers/editor_controller.rb
@@ -274,7 +362,11 @@ files:
274
362
  - app/models/.keep
275
363
  - app/models/concerns/.keep
276
364
  - app/models/source_code.rb
277
- - app/views/editor/index.html.erb
365
+ - app/views/editor/_block_tab.html.haml
366
+ - app/views/editor/_character_modal.html.haml
367
+ - app/views/editor/_toolbox.html.haml
368
+ - app/views/editor/demo.html.erb
369
+ - app/views/editor/index.html.haml
278
370
  - app/views/layouts/application.html.erb
279
371
  - bin/bundle
280
372
  - bin/rails
@@ -297,6 +389,7 @@ files:
297
389
  - config/initializers/mime_types.rb
298
390
  - config/initializers/secret_token.rb
299
391
  - config/initializers/session_store.rb
392
+ - config/initializers/teaspoon.rb
300
393
  - config/initializers/wrap_parameters.rb
301
394
  - config/locales/en.yml
302
395
  - config/routes.rb
@@ -310,51 +403,169 @@ files:
310
403
  - lib/smalruby_editor/version.rb
311
404
  - lib/tasks/.keep
312
405
  - lib/tasks/gem.rake
406
+ - lib/tasks/release.rake
313
407
  - lib/tasks/rspec.rake
314
408
  - lib/tasks/rubocop.rake
315
409
  - log/.keep
316
410
  - public/404.html
317
411
  - public/422.html
318
412
  - public/500.html
319
- - public/favicon.ico
413
+ - public/apple-touch-icon.png
414
+ - public/blockly/media/1x1.gif
415
+ - public/blockly/media/click.mp3
416
+ - public/blockly/media/click.ogg
417
+ - public/blockly/media/click.wav
418
+ - public/blockly/media/delete.mp3
419
+ - public/blockly/media/delete.ogg
420
+ - public/blockly/media/delete.wav
421
+ - public/blockly/media/handclosed.cur
422
+ - public/blockly/media/handopen.cur
423
+ - public/blockly/media/quote0.png
424
+ - public/blockly/media/quote1.png
425
+ - public/blockly/media/trashbody.png
426
+ - public/blockly/media/trashlid.png
427
+ - public/blockly/media/tree.png
428
+ - public/browserconfig.xml
320
429
  - public/fonts/FontAwesome.otf
321
430
  - public/fonts/fontawesome-webfont.eot
322
431
  - public/fonts/fontawesome-webfont.ttf
323
432
  - public/fonts/fontawesome-webfont.woff
433
+ - public/large.png
324
434
  - public/robots.txt
435
+ - public/smalruby/assets/ball1.png
436
+ - public/smalruby/assets/ball2.png
437
+ - public/smalruby/assets/ball3.png
438
+ - public/smalruby/assets/ball4.png
439
+ - public/smalruby/assets/ball5.png
440
+ - public/smalruby/assets/ball6.png
441
+ - public/smalruby/assets/car1.png
442
+ - public/smalruby/assets/car2.png
443
+ - public/smalruby/assets/car3.png
444
+ - public/smalruby/assets/car4.png
445
+ - public/smalruby/assets/cat1.png
446
+ - public/smalruby/assets/cat2.png
447
+ - public/smalruby/assets/cat3.png
448
+ - public/smalruby/assets/frog1.png
449
+ - public/smalruby/assets/piano_do.wav
450
+ - public/smalruby/assets/piano_do_2.wav
451
+ - public/smalruby/assets/piano_fa.wav
452
+ - public/smalruby/assets/piano_mi.wav
453
+ - public/smalruby/assets/piano_ra.wav
454
+ - public/smalruby/assets/piano_re.wav
455
+ - public/smalruby/assets/piano_si.wav
456
+ - public/smalruby/assets/piano_so.wav
457
+ - public/square.png
458
+ - public/tiny.png
459
+ - public/wide.png
325
460
  - smalruby-editor.gemspec
461
+ - spec/acceptance/block_mode/blocks/character/new.feature
462
+ - spec/acceptance/block_mode/blocks/control/await.feature
463
+ - spec/acceptance/block_mode/blocks/control/await_until.feature
464
+ - spec/acceptance/block_mode/blocks/control/break.feature
465
+ - spec/acceptance/block_mode/blocks/control/if.feature
466
+ - spec/acceptance/block_mode/blocks/control/if_else.feature
467
+ - spec/acceptance/block_mode/blocks/control/loop.feature
468
+ - spec/acceptance/block_mode/blocks/control/next.feature
469
+ - spec/acceptance/block_mode/blocks/control/redo.feature
470
+ - spec/acceptance/block_mode/blocks/control/sleep.feature
471
+ - spec/acceptance/block_mode/blocks/control/times.feature
472
+ - spec/acceptance/block_mode/blocks/control/until.feature
473
+ - spec/acceptance/block_mode/blocks/events/on_click.feature
474
+ - spec/acceptance/block_mode/blocks/events/on_hit.feature
475
+ - spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature
476
+ - spec/acceptance/block_mode/blocks/events/on_start.feature
477
+ - spec/acceptance/block_mode/blocks/hardware/init_hardware.feature
478
+ - spec/acceptance/block_mode/blocks/hardware/led_off.feature
479
+ - spec/acceptance/block_mode/blocks/hardware/led_on.feature
480
+ - spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature
481
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature
482
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature
483
+ - spec/acceptance/block_mode/blocks/hardware/sensor_value.feature
484
+ - spec/acceptance/block_mode/blocks/looks/hide.feature
485
+ - spec/acceptance/block_mode/blocks/looks/say.feature
486
+ - spec/acceptance/block_mode/blocks/looks/show.feature
487
+ - spec/acceptance/block_mode/blocks/looks/vanish.feature
488
+ - spec/acceptance/block_mode/blocks/motion/change_x_by.feature
489
+ - spec/acceptance/block_mode/blocks/motion/change_y_by.feature
490
+ - spec/acceptance/block_mode/blocks/motion/move.feature
491
+ - spec/acceptance/block_mode/blocks/motion/reach_wall.feature
492
+ - spec/acceptance/block_mode/blocks/motion/rotate_left.feature
493
+ - spec/acceptance/block_mode/blocks/motion/rotate_right.feature
494
+ - spec/acceptance/block_mode/blocks/motion/self_angle.feature
495
+ - spec/acceptance/block_mode/blocks/motion/self_x.feature
496
+ - spec/acceptance/block_mode/blocks/motion/self_y.feature
497
+ - spec/acceptance/block_mode/blocks/motion/set_angle.feature
498
+ - spec/acceptance/block_mode/blocks/motion/set_x.feature
499
+ - spec/acceptance/block_mode/blocks/motion/set_x_y.feature
500
+ - spec/acceptance/block_mode/blocks/motion/set_y.feature
501
+ - spec/acceptance/block_mode/blocks/motion/turn.feature
502
+ - spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature
503
+ - spec/acceptance/block_mode/blocks/sensing/character_property.feature
504
+ - spec/acceptance/block_mode/blocks/sensing/hit.feature
505
+ - spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature
506
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature
507
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature
508
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature
509
+ - spec/acceptance/block_mode/blocks/sensing/time_now.feature
510
+ - spec/acceptance/block_mode/blocks/sound/play.feature
511
+ - spec/acceptance/block_mode/demo.feature
326
512
  - spec/acceptance/readme.md
327
- - spec/acceptance/standalone/check.feature
513
+ - spec/acceptance/ruby_mode/base.feature
514
+ - spec/acceptance/ruby_mode/check.feature
515
+ - spec/acceptance/ruby_mode/download.feature
516
+ - spec/acceptance/ruby_mode/load.feature
517
+ - spec/acceptance/standalone/run.feature
328
518
  - spec/acceptance/standalone/save.feature
329
- - spec/acceptance/text_editor/base.feature
330
- - spec/acceptance/text_editor/check.feature
331
- - spec/acceptance/text_editor/load.feature
332
- - spec/acceptance/text_editor/save.feature
333
519
  - spec/controllers/editor_controller_spec.rb
334
520
  - spec/controllers/source_codes_controller_spec.rb
335
521
  - spec/fixtures/files/01.rb
336
522
  - spec/fixtures/files/favicon.ico
337
523
  - spec/helpers/editor_helper_spec.rb
524
+ - spec/javascripts/collections/character_set_spec.coffee
525
+ - spec/javascripts/models/character_spec.coffee
526
+ - spec/javascripts/models/scene_spec.coffee
527
+ - spec/javascripts/spec_helper.js
338
528
  - spec/lib/smalruby_editor_spec.rb
339
529
  - spec/models/source_code_spec.rb
340
530
  - spec/spec_helper.rb
341
531
  - spec/steps/ace_steps.rb
532
+ - spec/steps/block_mode_steps.rb
342
533
  - spec/steps/global_variable.rb
343
534
  - spec/steps/text_editor_steps.rb
344
- - spec/support/assets.rb
345
535
  - spec/support/capybara.rb
346
536
  - spec/support/env.rb
537
+ - spec/teaspoon_env.rb
347
538
  - spec/turnip_helper.rb
348
539
  - vendor/assets/javascripts/.keep
540
+ - vendor/assets/javascripts/blockly/blockly_compressed.js
541
+ - vendor/assets/javascripts/blockly/blocks_compressed.js
542
+ - vendor/assets/javascripts/blockly/msg/js/ja.js
543
+ - vendor/assets/javascripts/jquery.blockUI.js
349
544
  - vendor/assets/stylesheets/.keep
350
- - public/assets/application-ba0c47b4699119d7c75b88c4eef30e9a.js
351
- - public/assets/application-ba0c47b4699119d7c75b88c4eef30e9a.js.gz
352
- - public/assets/application-f51ea0e777d97f12a8ce84308f31eb57.css
353
- - public/assets/application-f51ea0e777d97f12a8ce84308f31eb57.css.gz
354
- - public/assets/favicon-c7ae857bb9d06de8742ae2d337157e83.ico
545
+ - public/assets/application-0c2ae32cd8822cec7ba6e445e2501010.js
546
+ - public/assets/application-0c2ae32cd8822cec7ba6e445e2501010.js.gz
547
+ - public/assets/application-0e1a6c238c0cc501b29746e5db35b5a1.css
548
+ - public/assets/application-0e1a6c238c0cc501b29746e5db35b5a1.css.gz
549
+ - public/assets/default-7f438ebd7f8ab6ef65c5b9744786e57f.xml
550
+ - public/assets/favicon-a37c90b368fd8ed436cb8f9e9396465c.ico
551
+ - public/assets/jquery-ui/animated-overlay-c48c87b7a95316f4698484e3b85ee4aa.gif
552
+ - public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-58b63faadd031ca3db096dfdffd90224.png
553
+ - public/assets/jquery-ui/ui-bg_flat_75_ffffff_40x100-937399e8b369d64aa075d13a82c00112.png
554
+ - public/assets/jquery-ui/ui-bg_glass_55_fbf9ee_1x400-a8c503e0f42a081a92a473b0d30ac6cf.png
555
+ - public/assets/jquery-ui/ui-bg_glass_65_ffffff_1x400-ddcbfe385abc3947937caa0b44e2f5d2.png
556
+ - public/assets/jquery-ui/ui-bg_glass_75_dadada_1x400-14dd4a9ad1f21d8c4c7e673ddfb0806f.png
557
+ - public/assets/jquery-ui/ui-bg_glass_75_e6e6e6_1x400-a43dfabb23b0a987b567b282bad68346.png
558
+ - public/assets/jquery-ui/ui-bg_glass_95_fef1ec_1x400-31c0c791a756266043ee8ea61dacb36a.png
559
+ - public/assets/jquery-ui/ui-bg_highlight-soft_75_cccccc_1x100-33edbdb0d2fcebd2a65c2041a28533da.png
560
+ - public/assets/jquery-ui/ui-icons_222222_256x240-890385424135de1513f00cbecfb7f990.png
561
+ - public/assets/jquery-ui/ui-icons_2e83ff_256x240-824705ca4aa2610434a358fe4018c9c6.png
562
+ - public/assets/jquery-ui/ui-icons_454545_256x240-254e054f6df453dfac49efbc8b78f79d.png
563
+ - public/assets/jquery-ui/ui-icons_888888_256x240-57c441f87c4289a5372823f506c1182d.png
564
+ - public/assets/jquery-ui/ui-icons_cd0a0a_256x240-261647ac915575f3981ded254ae8d43e.png
355
565
  - public/assets/loading-e8e6dd7833131c92a6c3b9c8ccc6a6ac.gif
356
- - public/assets/manifest-3bcabf5c85a81c33c1c52b6bf869bb16.json
566
+ - public/assets/manifest-1f254fa92a71ba4faad0f99136daeed8.json
357
567
  - public/assets/progressbar-82023a146fba2a0f6d925629ed2b09c5.gif
568
+ - public/assets/rgb_led_anode-91225bef2a8b97f1cefee862a0619b91.xml
358
569
  homepage: https://github.com/smalruby/smalruby-editor
359
570
  licenses:
360
571
  - MIT
@@ -385,25 +596,81 @@ signing_key:
385
596
  specification_version: 4
386
597
  summary: A visual programming editor.
387
598
  test_files:
599
+ - spec/acceptance/block_mode/blocks/character/new.feature
600
+ - spec/acceptance/block_mode/blocks/control/await.feature
601
+ - spec/acceptance/block_mode/blocks/control/await_until.feature
602
+ - spec/acceptance/block_mode/blocks/control/break.feature
603
+ - spec/acceptance/block_mode/blocks/control/if.feature
604
+ - spec/acceptance/block_mode/blocks/control/if_else.feature
605
+ - spec/acceptance/block_mode/blocks/control/loop.feature
606
+ - spec/acceptance/block_mode/blocks/control/next.feature
607
+ - spec/acceptance/block_mode/blocks/control/redo.feature
608
+ - spec/acceptance/block_mode/blocks/control/sleep.feature
609
+ - spec/acceptance/block_mode/blocks/control/times.feature
610
+ - spec/acceptance/block_mode/blocks/control/until.feature
611
+ - spec/acceptance/block_mode/blocks/events/on_click.feature
612
+ - spec/acceptance/block_mode/blocks/events/on_hit.feature
613
+ - spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature
614
+ - spec/acceptance/block_mode/blocks/events/on_start.feature
615
+ - spec/acceptance/block_mode/blocks/hardware/init_hardware.feature
616
+ - spec/acceptance/block_mode/blocks/hardware/led_off.feature
617
+ - spec/acceptance/block_mode/blocks/hardware/led_on.feature
618
+ - spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature
619
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature
620
+ - spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature
621
+ - spec/acceptance/block_mode/blocks/hardware/sensor_value.feature
622
+ - spec/acceptance/block_mode/blocks/looks/hide.feature
623
+ - spec/acceptance/block_mode/blocks/looks/say.feature
624
+ - spec/acceptance/block_mode/blocks/looks/show.feature
625
+ - spec/acceptance/block_mode/blocks/looks/vanish.feature
626
+ - spec/acceptance/block_mode/blocks/motion/change_x_by.feature
627
+ - spec/acceptance/block_mode/blocks/motion/change_y_by.feature
628
+ - spec/acceptance/block_mode/blocks/motion/move.feature
629
+ - spec/acceptance/block_mode/blocks/motion/reach_wall.feature
630
+ - spec/acceptance/block_mode/blocks/motion/rotate_left.feature
631
+ - spec/acceptance/block_mode/blocks/motion/rotate_right.feature
632
+ - spec/acceptance/block_mode/blocks/motion/self_angle.feature
633
+ - spec/acceptance/block_mode/blocks/motion/self_x.feature
634
+ - spec/acceptance/block_mode/blocks/motion/self_y.feature
635
+ - spec/acceptance/block_mode/blocks/motion/set_angle.feature
636
+ - spec/acceptance/block_mode/blocks/motion/set_x.feature
637
+ - spec/acceptance/block_mode/blocks/motion/set_x_y.feature
638
+ - spec/acceptance/block_mode/blocks/motion/set_y.feature
639
+ - spec/acceptance/block_mode/blocks/motion/turn.feature
640
+ - spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature
641
+ - spec/acceptance/block_mode/blocks/sensing/character_property.feature
642
+ - spec/acceptance/block_mode/blocks/sensing/hit.feature
643
+ - spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature
644
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature
645
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature
646
+ - spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature
647
+ - spec/acceptance/block_mode/blocks/sensing/time_now.feature
648
+ - spec/acceptance/block_mode/blocks/sound/play.feature
649
+ - spec/acceptance/block_mode/demo.feature
388
650
  - spec/acceptance/readme.md
389
- - spec/acceptance/standalone/check.feature
651
+ - spec/acceptance/ruby_mode/base.feature
652
+ - spec/acceptance/ruby_mode/check.feature
653
+ - spec/acceptance/ruby_mode/download.feature
654
+ - spec/acceptance/ruby_mode/load.feature
655
+ - spec/acceptance/standalone/run.feature
390
656
  - spec/acceptance/standalone/save.feature
391
- - spec/acceptance/text_editor/base.feature
392
- - spec/acceptance/text_editor/check.feature
393
- - spec/acceptance/text_editor/load.feature
394
- - spec/acceptance/text_editor/save.feature
395
657
  - spec/controllers/editor_controller_spec.rb
396
658
  - spec/controllers/source_codes_controller_spec.rb
397
659
  - spec/fixtures/files/01.rb
398
660
  - spec/fixtures/files/favicon.ico
399
661
  - spec/helpers/editor_helper_spec.rb
662
+ - spec/javascripts/collections/character_set_spec.coffee
663
+ - spec/javascripts/models/character_spec.coffee
664
+ - spec/javascripts/models/scene_spec.coffee
665
+ - spec/javascripts/spec_helper.js
400
666
  - spec/lib/smalruby_editor_spec.rb
401
667
  - spec/models/source_code_spec.rb
402
668
  - spec/spec_helper.rb
403
669
  - spec/steps/ace_steps.rb
670
+ - spec/steps/block_mode_steps.rb
404
671
  - spec/steps/global_variable.rb
405
672
  - spec/steps/text_editor_steps.rb
406
- - spec/support/assets.rb
407
673
  - spec/support/capybara.rb
408
674
  - spec/support/env.rb
675
+ - spec/teaspoon_env.rb
409
676
  - 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