smalruby-editor 0.1.22-x86-mingw32 → 0.1.23-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 (396) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.rspec +0 -0
  4. data/.rubocop.yml +0 -0
  5. data/.ruby-version +1 -1
  6. data/.simplecov +0 -0
  7. data/.travis.yml +1 -1
  8. data/LEGAL +0 -0
  9. data/LICENSE +0 -0
  10. data/Procfile +0 -0
  11. data/README.rdoc +1 -0
  12. data/Rakefile +0 -0
  13. data/app/assets/images/.keep +0 -0
  14. data/app/assets/images/favicon.ico +0 -0
  15. data/app/assets/javascripts/application.js +0 -1
  16. data/app/assets/javascripts/blocks/blockly.js.coffee.erb +0 -0
  17. data/app/assets/javascripts/blocks/character.js.coffee.erb +0 -0
  18. data/app/assets/javascripts/blocks/control.js.coffee.erb +16 -19
  19. data/app/assets/javascripts/blocks/data.js.coffee.erb +0 -0
  20. data/app/assets/javascripts/blocks/etc.js.coffee.erb +0 -0
  21. data/app/assets/javascripts/blocks/events.js.coffee.erb +8 -6
  22. data/app/assets/javascripts/blocks/field_character.js.coffee.erb +6 -1
  23. data/app/assets/javascripts/blocks/hardware.js.coffee.erb +117 -167
  24. data/app/assets/javascripts/blocks/looks.js.coffee.erb +14 -16
  25. data/app/assets/javascripts/blocks/motion.js.coffee.erb +46 -47
  26. data/app/assets/javascripts/blocks/operators.js.coffee.erb +54 -57
  27. data/app/assets/javascripts/blocks/pen.js.coffee.erb +5 -9
  28. data/app/assets/javascripts/blocks/ruby.js.coffee.erb +4 -3
  29. data/app/assets/javascripts/blocks/sensing.js.coffee.erb +53 -48
  30. data/app/assets/javascripts/blocks/sound.js.coffee.erb +12 -10
  31. data/app/assets/javascripts/collections/.keep +0 -0
  32. data/app/assets/javascripts/collections/character_set.js.coffee +0 -0
  33. data/app/assets/javascripts/fix_blockly.js +74 -0
  34. data/app/assets/javascripts/generators/ruby.js.coffee.erb +0 -0
  35. data/app/assets/javascripts/models/.keep +0 -0
  36. data/app/assets/javascripts/models/character.js.coffee +0 -0
  37. data/app/assets/javascripts/models/scene.js.coffee +0 -0
  38. data/app/assets/javascripts/models/source_code.js.coffee +0 -0
  39. data/app/assets/javascripts/msg/en_us.js +236 -0
  40. data/app/assets/javascripts/msg/ja.js +237 -0
  41. data/app/assets/javascripts/routers/.keep +0 -0
  42. data/app/assets/javascripts/smalruby.js.coffee +8 -0
  43. data/app/assets/javascripts/views/.keep +0 -0
  44. data/app/assets/javascripts/views/character_modal_view.js.coffee +0 -0
  45. data/app/assets/javascripts/views/character_selector_view.js.coffee +0 -0
  46. data/app/assets/javascripts/views/load_modal_view.js.coffee +0 -0
  47. data/app/assets/javascripts/views/{main_menu_view.js.coffee → main_menu_view.js.coffee.erb} +19 -18
  48. data/app/assets/javascripts/views/reset_modal_view.js.coffee +0 -0
  49. data/app/assets/javascripts/views/signin_modal_view.js.coffee +0 -0
  50. data/app/assets/stylesheets/application.css +0 -0
  51. data/app/assets/stylesheets/editor.css.scss +4 -0
  52. data/app/assets/stylesheets/flatstrap-custom.css.scss +0 -0
  53. data/app/assets/stylesheets/load-modal.css.scss +0 -0
  54. data/app/assets/stylesheets/toolbox.css.scss.erb +0 -0
  55. data/app/assets/templates/.keep +0 -0
  56. data/app/controllers/application_controller.rb +16 -0
  57. data/app/controllers/concerns/.keep +0 -0
  58. data/app/controllers/editor_controller.rb +0 -0
  59. data/app/controllers/sessions_controller.rb +0 -0
  60. data/app/controllers/source_codes_controller.rb +0 -0
  61. data/app/helpers/application_helper.rb +11 -0
  62. data/app/helpers/editor_helper.rb +0 -0
  63. data/app/helpers/sessions_helper.rb +0 -0
  64. data/app/mailers/.keep +0 -0
  65. data/app/models/.keep +0 -0
  66. data/app/models/concerns/.keep +0 -0
  67. data/app/models/concerns/ruby_to_block.rb +0 -0
  68. data/app/models/concerns/ruby_to_block/block.rb +0 -0
  69. data/app/models/concerns/ruby_to_block/block/base.rb +0 -0
  70. data/app/models/concerns/ruby_to_block/block/character.rb +0 -0
  71. data/app/models/concerns/ruby_to_block/block/character_event.rb +0 -0
  72. data/app/models/concerns/ruby_to_block/block/character_method_call.rb +0 -0
  73. data/app/models/concerns/ruby_to_block/block/character_new.rb +0 -0
  74. data/app/models/concerns/ruby_to_block/block/character_operation.rb +0 -0
  75. data/app/models/concerns/ruby_to_block/block/control_beark.rb +0 -0
  76. data/app/models/concerns/ruby_to_block/block/control_if.rb +0 -0
  77. data/app/models/concerns/ruby_to_block/block/control_loop.rb +0 -0
  78. data/app/models/concerns/ruby_to_block/block/control_sleep.rb +0 -0
  79. data/app/models/concerns/ruby_to_block/block/do.rb +0 -0
  80. data/app/models/concerns/ruby_to_block/block/else.rb +0 -0
  81. data/app/models/concerns/ruby_to_block/block/end.rb +0 -0
  82. data/app/models/concerns/ruby_to_block/block/events_on_click.rb +0 -0
  83. data/app/models/concerns/ruby_to_block/block/events_on_key_push_or_down.rb +0 -0
  84. data/app/models/concerns/ruby_to_block/block/events_on_start.rb +0 -0
  85. data/app/models/concerns/ruby_to_block/block/hardware_button_down_or_up.rb +0 -0
  86. data/app/models/concerns/ruby_to_block/block/hardware_button_not_use_pullup.rb +0 -0
  87. data/app/models/concerns/ruby_to_block/block/hardware_init_hardware.rb +0 -0
  88. data/app/models/concerns/ruby_to_block/block/hardware_led_off.rb +0 -0
  89. data/app/models/concerns/ruby_to_block/block/hardware_led_on.rb +0 -0
  90. data/app/models/concerns/ruby_to_block/block/hardware_motor_driver.rb +0 -0
  91. data/app/models/concerns/ruby_to_block/block/hardware_motor_driver_set_speed.rb +0 -0
  92. data/app/models/concerns/ruby_to_block/block/hardware_motor_driver_speed.rb +0 -0
  93. data/app/models/concerns/ruby_to_block/block/hardware_on_button_down_or_up.rb +0 -0
  94. data/app/models/concerns/ruby_to_block/block/hardware_on_sensor_change.rb +0 -0
  95. data/app/models/concerns/ruby_to_block/block/hardware_operation.rb +0 -0
  96. data/app/models/concerns/ruby_to_block/block/hardware_rgb_led_off.rb +0 -0
  97. data/app/models/concerns/ruby_to_block/block/hardware_rgb_led_on.rb +0 -0
  98. data/app/models/concerns/ruby_to_block/block/hardware_sensor_value.rb +0 -0
  99. data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car.rb +0 -0
  100. data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_commands.rb +0 -0
  101. data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_run.rb +0 -0
  102. data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_set_speed.rb +0 -0
  103. data/app/models/concerns/ruby_to_block/block/hardware_two_wheel_drive_car_speed.rb +0 -0
  104. data/app/models/concerns/ruby_to_block/block/looks_hide.rb +0 -0
  105. data/app/models/concerns/ruby_to_block/block/looks_say.rb +0 -0
  106. data/app/models/concerns/ruby_to_block/block/looks_show.rb +0 -0
  107. data/app/models/concerns/ruby_to_block/block/looks_vanish.rb +0 -0
  108. data/app/models/concerns/ruby_to_block/block/math_number.rb +0 -0
  109. data/app/models/concerns/ruby_to_block/block/motion_change_x_by.rb +0 -0
  110. data/app/models/concerns/ruby_to_block/block/motion_change_y_by.rb +0 -0
  111. data/app/models/concerns/ruby_to_block/block/motion_go_to_character.rb +0 -0
  112. data/app/models/concerns/ruby_to_block/block/motion_go_to_mouse.rb +0 -0
  113. data/app/models/concerns/ruby_to_block/block/motion_move.rb +0 -0
  114. data/app/models/concerns/ruby_to_block/block/motion_point_towards_character.rb +0 -0
  115. data/app/models/concerns/ruby_to_block/block/motion_point_towards_mouse.rb +0 -0
  116. data/app/models/concerns/ruby_to_block/block/motion_rotate_left.rb +0 -0
  117. data/app/models/concerns/ruby_to_block/block/motion_rotate_right.rb +0 -0
  118. data/app/models/concerns/ruby_to_block/block/motion_self_angle.rb +0 -0
  119. data/app/models/concerns/ruby_to_block/block/motion_self_x.rb +0 -0
  120. data/app/models/concerns/ruby_to_block/block/motion_self_y.rb +0 -0
  121. data/app/models/concerns/ruby_to_block/block/motion_set_angle.rb +0 -0
  122. data/app/models/concerns/ruby_to_block/block/motion_set_rotation_style.rb +17 -0
  123. data/app/models/concerns/ruby_to_block/block/motion_set_x.rb +0 -0
  124. data/app/models/concerns/ruby_to_block/block/motion_set_x_y.rb +0 -0
  125. data/app/models/concerns/ruby_to_block/block/motion_set_y.rb +0 -0
  126. data/app/models/concerns/ruby_to_block/block/motion_turn.rb +0 -0
  127. data/app/models/concerns/ruby_to_block/block/motion_turn_if_reach_wall.rb +0 -0
  128. data/app/models/concerns/ruby_to_block/block/motion_turn_xy.rb +0 -0
  129. data/app/models/concerns/ruby_to_block/block/null.rb +0 -0
  130. data/app/models/concerns/ruby_to_block/block/operators_compare.rb +0 -0
  131. data/app/models/concerns/ruby_to_block/block/operators_false.rb +0 -0
  132. data/app/models/concerns/ruby_to_block/block/operators_true.rb +0 -0
  133. data/app/models/concerns/ruby_to_block/block/require_smalruby.rb +0 -0
  134. data/app/models/concerns/ruby_to_block/block/ruby_comment.rb +0 -0
  135. data/app/models/concerns/ruby_to_block/block/ruby_expression.rb +0 -0
  136. data/app/models/concerns/ruby_to_block/block/ruby_p.rb +0 -0
  137. data/app/models/concerns/ruby_to_block/block/ruby_statement.rb +0 -0
  138. data/app/models/concerns/ruby_to_block/block/sensing_hit.rb +0 -0
  139. data/app/models/concerns/ruby_to_block/block/sensing_reach_wall.rb +0 -0
  140. data/app/models/concerns/ruby_to_block/block/sound_play.rb +0 -0
  141. data/app/models/concerns/ruby_to_block/block/sound_preset_sounds.rb +0 -0
  142. data/app/models/concerns/ruby_to_block/block/text.rb +0 -0
  143. data/app/models/concerns/ruby_to_block/block/value.rb +0 -0
  144. data/app/models/concerns/ruby_to_block/context.rb +0 -0
  145. data/app/models/concerns/ruby_to_block/formatter.rb +0 -0
  146. data/app/models/source_code.rb +0 -0
  147. data/app/views/editor/_block_tab.html.haml +4 -4
  148. data/app/views/editor/_character_modal.html.haml +7 -7
  149. data/app/views/editor/_load_modal.html.haml +6 -6
  150. data/app/views/editor/_reset_modal.html.haml +0 -0
  151. data/app/views/editor/_signin_modal.html.haml +0 -0
  152. data/app/views/editor/_toolbox.html.haml +39 -39
  153. data/app/views/editor/demo.html.erb +0 -0
  154. data/app/views/editor/index.html.haml +18 -18
  155. data/app/views/layouts/application.html.erb +2 -0
  156. data/bin/bundle +0 -0
  157. data/bin/rails +0 -0
  158. data/bin/rake +0 -0
  159. data/bin/smalruby-editor +0 -0
  160. data/config.ru +0 -0
  161. data/config/application.rb +1 -1
  162. data/config/boot.rb +0 -0
  163. data/config/database.yml.mysql2 +0 -0
  164. data/config/database.yml.sqlite3 +0 -0
  165. data/config/database.yml.travis +0 -0
  166. data/config/environment.rb +0 -0
  167. data/config/environments/development.rb +0 -0
  168. data/config/environments/production.rb +4 -1
  169. data/config/environments/standalone.rb +0 -0
  170. data/config/environments/test.rb +0 -0
  171. data/config/initializers/backtrace_silencers.rb +0 -0
  172. data/config/initializers/filter_parameter_logging.rb +0 -0
  173. data/config/initializers/inflections.rb +0 -0
  174. data/config/initializers/mime_types.rb +0 -0
  175. data/config/initializers/secret_token.rb +0 -0
  176. data/config/initializers/session_store.rb +0 -0
  177. data/config/initializers/teaspoon.rb +0 -0
  178. data/config/initializers/wrap_parameters.rb +0 -0
  179. data/config/locales/en.yml +64 -22
  180. data/config/locales/ja.yml +65 -0
  181. data/config/routes.rb +3 -1
  182. data/config/unicorn.rb +0 -0
  183. data/db/migrate/20131216121603_create_source_codes.rb +0 -0
  184. data/db/migrate/20131219045113_add_filename_to_source_code.rb +0 -0
  185. data/db/schema.rb +0 -0
  186. data/db/seeds.rb +0 -0
  187. data/demos/adjust_2wd_car.rb.xml +0 -0
  188. data/demos/car_chase.rb.xml +0 -0
  189. data/demos/hardware_led.rb.xml +0 -0
  190. data/demos/pong.rb.xml +0 -0
  191. data/demos/star.rb.xml +0 -0
  192. data/lib/assets/.keep +0 -0
  193. data/lib/smalruby_editor.rb +0 -0
  194. data/lib/smalruby_editor/blockly_message_helper.rb +20 -0
  195. data/lib/smalruby_editor/version.rb +1 -1
  196. data/lib/tasks/.keep +0 -0
  197. data/lib/tasks/gem.rake +1 -3
  198. data/lib/tasks/release.rake +0 -0
  199. data/lib/tasks/rspec.rake +0 -0
  200. data/lib/tasks/rubocop.rake +0 -0
  201. data/log/.keep +0 -0
  202. data/public/404.html +0 -0
  203. data/public/422.html +0 -0
  204. data/public/500.html +0 -0
  205. data/public/apple-touch-icon.png +0 -0
  206. data/public/blockly/media/1x1.gif +0 -0
  207. data/public/blockly/media/click.mp3 +0 -0
  208. data/public/blockly/media/click.ogg +0 -0
  209. data/public/blockly/media/click.wav +0 -0
  210. data/public/blockly/media/delete.mp3 +0 -0
  211. data/public/blockly/media/delete.ogg +0 -0
  212. data/public/blockly/media/delete.wav +0 -0
  213. data/public/blockly/media/handclosed.cur +0 -0
  214. data/public/blockly/media/handopen.cur +0 -0
  215. data/public/blockly/media/quote0.png +0 -0
  216. data/public/blockly/media/quote1.png +0 -0
  217. data/public/blockly/media/trashbody.png +0 -0
  218. data/public/blockly/media/trashlid.png +0 -0
  219. data/public/blockly/media/tree.png +0 -0
  220. data/public/browserconfig.xml +0 -0
  221. data/public/fonts/FontAwesome.otf +0 -0
  222. data/public/fonts/fontawesome-webfont.eot +0 -0
  223. data/public/fonts/fontawesome-webfont.ttf +0 -0
  224. data/public/fonts/fontawesome-webfont.woff +0 -0
  225. data/public/large.png +0 -0
  226. data/public/robots.txt +0 -0
  227. data/public/smalruby/assets/ball1.png +0 -0
  228. data/public/smalruby/assets/ball2.png +0 -0
  229. data/public/smalruby/assets/ball3.png +0 -0
  230. data/public/smalruby/assets/ball4.png +0 -0
  231. data/public/smalruby/assets/ball5.png +0 -0
  232. data/public/smalruby/assets/ball6.png +0 -0
  233. data/public/smalruby/assets/car1.png +0 -0
  234. data/public/smalruby/assets/car2.png +0 -0
  235. data/public/smalruby/assets/car3.png +0 -0
  236. data/public/smalruby/assets/car4.png +0 -0
  237. data/public/smalruby/assets/cat1.png +0 -0
  238. data/public/smalruby/assets/cat2.png +0 -0
  239. data/public/smalruby/assets/cat3.png +0 -0
  240. data/public/smalruby/assets/frog1.png +0 -0
  241. data/public/smalruby/assets/piano_do.wav +0 -0
  242. data/public/smalruby/assets/piano_do_2.wav +0 -0
  243. data/public/smalruby/assets/piano_fa.wav +0 -0
  244. data/public/smalruby/assets/piano_mi.wav +0 -0
  245. data/public/smalruby/assets/piano_ra.wav +0 -0
  246. data/public/smalruby/assets/piano_re.wav +0 -0
  247. data/public/smalruby/assets/piano_si.wav +0 -0
  248. data/public/smalruby/assets/piano_so.wav +0 -0
  249. data/public/smalruby/assets/ryu1.png +0 -0
  250. data/public/smalruby/assets/ryu2.png +0 -0
  251. data/public/smalruby/assets/taichi1.png +0 -0
  252. data/public/smalruby/assets/taichi2.png +0 -0
  253. data/public/square.png +0 -0
  254. data/public/tiny.png +0 -0
  255. data/public/wide.png +0 -0
  256. data/smalruby-editor.gemspec +1 -1
  257. data/spec/acceptance/base.feature +0 -0
  258. data/spec/acceptance/block_mode/blocks/character/new.feature +0 -0
  259. data/spec/acceptance/block_mode/blocks/control/await.feature +0 -0
  260. data/spec/acceptance/block_mode/blocks/control/await_until.feature +0 -0
  261. data/spec/acceptance/block_mode/blocks/control/break.feature +0 -0
  262. data/spec/acceptance/block_mode/blocks/control/if.feature +0 -0
  263. data/spec/acceptance/block_mode/blocks/control/if_else.feature +0 -0
  264. data/spec/acceptance/block_mode/blocks/control/loop.feature +0 -0
  265. data/spec/acceptance/block_mode/blocks/control/next.feature +0 -0
  266. data/spec/acceptance/block_mode/blocks/control/redo.feature +0 -0
  267. data/spec/acceptance/block_mode/blocks/control/sleep.feature +0 -0
  268. data/spec/acceptance/block_mode/blocks/control/times.feature +0 -0
  269. data/spec/acceptance/block_mode/blocks/control/until.feature +0 -0
  270. data/spec/acceptance/block_mode/blocks/events/on_click.feature +0 -0
  271. data/spec/acceptance/block_mode/blocks/events/on_hit.feature +0 -0
  272. data/spec/acceptance/block_mode/blocks/events/on_key_push_or_down.feature +0 -0
  273. data/spec/acceptance/block_mode/blocks/events/on_start.feature +0 -0
  274. data/spec/acceptance/block_mode/blocks/hardware/button_down_or_up.feature +0 -0
  275. data/spec/acceptance/block_mode/blocks/hardware/button_not_use_pullup.feature +0 -0
  276. data/spec/acceptance/block_mode/blocks/hardware/init_hardware.feature +0 -0
  277. data/spec/acceptance/block_mode/blocks/hardware/led_off.feature +0 -0
  278. data/spec/acceptance/block_mode/blocks/hardware/led_on.feature +0 -0
  279. data/spec/acceptance/block_mode/blocks/hardware/motor_driver.feature +0 -0
  280. data/spec/acceptance/block_mode/blocks/hardware/motor_driver_speed.feature +0 -0
  281. data/spec/acceptance/block_mode/blocks/hardware/on_button_down_or_up.feature +0 -0
  282. data/spec/acceptance/block_mode/blocks/hardware/on_sensor_change.feature +0 -0
  283. data/spec/acceptance/block_mode/blocks/hardware/rgb_led_off.feature +0 -0
  284. data/spec/acceptance/block_mode/blocks/hardware/rgb_led_on.feature +0 -0
  285. data/spec/acceptance/block_mode/blocks/hardware/sensor_value.feature +0 -0
  286. data/spec/acceptance/block_mode/blocks/hardware/servo_set_position.feature +0 -0
  287. data/spec/acceptance/block_mode/blocks/hardware/two_wheel_drive_car.feature +0 -0
  288. data/spec/acceptance/block_mode/blocks/hardware/two_wheel_drive_car_speed.feature +0 -0
  289. data/spec/acceptance/block_mode/blocks/looks/hide.feature +0 -0
  290. data/spec/acceptance/block_mode/blocks/looks/say.feature +0 -0
  291. data/spec/acceptance/block_mode/blocks/looks/show.feature +0 -0
  292. data/spec/acceptance/block_mode/blocks/looks/vanish.feature +0 -0
  293. data/spec/acceptance/block_mode/blocks/motion/change_x_by.feature +0 -0
  294. data/spec/acceptance/block_mode/blocks/motion/change_y_by.feature +0 -0
  295. data/spec/acceptance/block_mode/blocks/motion/move.feature +0 -0
  296. data/spec/acceptance/block_mode/blocks/motion/reach_wall.feature +0 -0
  297. data/spec/acceptance/block_mode/blocks/motion/rotate_left.feature +0 -0
  298. data/spec/acceptance/block_mode/blocks/motion/rotate_right.feature +0 -0
  299. data/spec/acceptance/block_mode/blocks/motion/self_angle.feature +0 -0
  300. data/spec/acceptance/block_mode/blocks/motion/self_x.feature +0 -0
  301. data/spec/acceptance/block_mode/blocks/motion/self_y.feature +0 -0
  302. data/spec/acceptance/block_mode/blocks/motion/set_angle.feature +0 -0
  303. data/spec/acceptance/block_mode/blocks/motion/set_x.feature +0 -0
  304. data/spec/acceptance/block_mode/blocks/motion/set_x_y.feature +0 -0
  305. data/spec/acceptance/block_mode/blocks/motion/set_y.feature +0 -0
  306. data/spec/acceptance/block_mode/blocks/motion/turn.feature +0 -0
  307. data/spec/acceptance/block_mode/blocks/motion/turn_if_reach_wall.feature +0 -0
  308. data/spec/acceptance/block_mode/blocks/operators/and_or.feature +0 -0
  309. data/spec/acceptance/block_mode/blocks/operators/four_arithmetic_and_compares.feature +0 -0
  310. data/spec/acceptance/block_mode/blocks/operators/index_of.feature +0 -0
  311. data/spec/acceptance/block_mode/blocks/operators/length.feature +0 -0
  312. data/spec/acceptance/block_mode/blocks/operators/math_method.feature +0 -0
  313. data/spec/acceptance/block_mode/blocks/operators/negate.feature +0 -0
  314. data/spec/acceptance/block_mode/blocks/operators/rand.feature +0 -0
  315. data/spec/acceptance/block_mode/blocks/operators/round.feature +0 -0
  316. data/spec/acceptance/block_mode/blocks/operators/text.feature +0 -0
  317. data/spec/acceptance/block_mode/blocks/operators/true_false.feature +0 -0
  318. data/spec/acceptance/block_mode/blocks/ruby/expression.feature +0 -0
  319. data/spec/acceptance/block_mode/blocks/ruby/p.feature +0 -0
  320. data/spec/acceptance/block_mode/blocks/ruby/statement_comment.feature +0 -0
  321. data/spec/acceptance/block_mode/blocks/sensing/character_property.feature +0 -0
  322. data/spec/acceptance/block_mode/blocks/sensing/hit.feature +0 -0
  323. data/spec/acceptance/block_mode/blocks/sensing/input_key_push_or_down.feature +0 -0
  324. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_x.feature +0 -0
  325. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_pos_y.feature +0 -0
  326. data/spec/acceptance/block_mode/blocks/sensing/input_mouse_push_or_down.feature +0 -0
  327. data/spec/acceptance/block_mode/blocks/sensing/reach_wall.feature +0 -0
  328. data/spec/acceptance/block_mode/blocks/sensing/time_now.feature +0 -0
  329. data/spec/acceptance/block_mode/blocks/sound/play.feature +0 -0
  330. data/spec/acceptance/block_mode/demo.feature +0 -0
  331. data/spec/acceptance/block_mode/translate.feature +0 -0
  332. data/spec/acceptance/readme.md +0 -0
  333. data/spec/acceptance/ruby_mode/check.feature +0 -0
  334. data/spec/acceptance/ruby_mode/download.feature +0 -0
  335. data/spec/acceptance/ruby_mode/load.feature +0 -0
  336. data/spec/acceptance/ruby_mode/translate.feature +0 -0
  337. data/spec/acceptance/standalone/run.feature +0 -0
  338. data/spec/acceptance/standalone/save.feature +0 -0
  339. data/spec/acceptance/standalone/signin.feature +0 -0
  340. data/spec/controllers/editor_controller_spec.rb +0 -0
  341. data/spec/controllers/sessions_controller_spec.rb +0 -0
  342. data/spec/controllers/source_codes_controller_spec.rb +0 -0
  343. data/spec/fixtures/files/01.rb +0 -0
  344. data/spec/fixtures/files/01.rb.xml +0 -0
  345. data/spec/fixtures/files/01_remix.rb +0 -0
  346. data/spec/fixtures/files/01_remix02.rb +0 -0
  347. data/spec/fixtures/files/01_remix10.rb.xml +0 -0
  348. data/spec/fixtures/files/favicon.ico +0 -0
  349. data/spec/helpers/editor_helper_spec.rb +0 -0
  350. data/spec/helpers/sessions_helper_spec.rb +0 -0
  351. data/spec/javascripts/collections/character_set_spec.coffee +0 -0
  352. data/spec/javascripts/models/character_spec.coffee +0 -0
  353. data/spec/javascripts/models/scene_spec.coffee +0 -0
  354. data/spec/javascripts/models/source_code_spec.coffee +0 -0
  355. data/spec/javascripts/spec_helper.js +0 -0
  356. data/spec/lib/smalruby_editor_spec.rb +0 -0
  357. data/spec/models/concerns/ruby_to_block/block/character_method_call_spec.rb +0 -0
  358. data/spec/models/concerns/ruby_to_block/block/control_if_spec.rb +0 -0
  359. data/spec/models/concerns/ruby_to_block/block/control_loop_spec.rb +0 -0
  360. data/spec/models/concerns/ruby_to_block/block/events_on_start_spec.rb +0 -0
  361. data/spec/models/concerns/ruby_to_block/block/hardware_spec.rb +0 -0
  362. data/spec/models/concerns/ruby_to_block/block/looks_say_spec.rb +0 -0
  363. data/spec/models/concerns/ruby_to_block/block/looks_spec.rb +0 -0
  364. data/spec/models/concerns/ruby_to_block/block/motion_move_spec.rb +0 -0
  365. data/spec/models/concerns/ruby_to_block/block/motion_spec.rb +0 -0
  366. data/spec/models/concerns/ruby_to_block/block/motion_turn_spec.rb +0 -0
  367. data/spec/models/concerns/ruby_to_block/block/motion_turn_xy_spec.rb +0 -0
  368. data/spec/models/concerns/ruby_to_block/block/require_smalruby_spec.rb +0 -0
  369. data/spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb +0 -0
  370. data/spec/models/concerns/ruby_to_block/block/ruby_statement_spec.rb +0 -0
  371. data/spec/models/concerns/ruby_to_block/block/sensing_reach_wall_spec.rb +0 -0
  372. data/spec/models/concerns/ruby_to_block/block/shared/block_examples.rb +0 -0
  373. data/spec/models/concerns/ruby_to_block/block/sound_spec.rb +0 -0
  374. data/spec/models/concerns/ruby_to_block/block/text_spec.rb +0 -0
  375. data/spec/models/concerns/ruby_to_block/block_spec.rb +0 -0
  376. data/spec/models/concerns/ruby_to_block_spec.rb +0 -0
  377. data/spec/models/source_code_spec.rb +0 -0
  378. data/spec/spec_helper.rb +0 -0
  379. data/spec/steps/base_steps.rb +1 -0
  380. data/spec/steps/block_mode_steps.rb +0 -0
  381. data/spec/steps/fix_turnip.rb +0 -0
  382. data/spec/steps/global_variable.rb +0 -0
  383. data/spec/steps/text_editor_steps.rb +0 -0
  384. data/spec/support/capybara.rb +0 -0
  385. data/spec/support/env.rb +0 -0
  386. data/spec/support/ruby_to_block.rb +0 -0
  387. data/spec/teaspoon_env.rb +0 -0
  388. data/spec/turnip_helper.rb +0 -0
  389. data/vendor/assets/javascripts/.keep +0 -0
  390. data/vendor/assets/javascripts/blockly/blockly_compressed.js +0 -0
  391. data/vendor/assets/javascripts/blockly/blocks_compressed.js +0 -0
  392. data/vendor/assets/javascripts/blockly/msg/js/en_us.js +507 -0
  393. data/vendor/assets/javascripts/blockly/msg/js/ja.js +0 -0
  394. data/vendor/assets/javascripts/jquery.blockUI.js +0 -0
  395. data/vendor/assets/stylesheets/.keep +0 -0
  396. metadata +80 -66
File without changes
@@ -4,7 +4,7 @@
4
4
  %li.active
5
5
  %a#block-mode-button{:href => "#block-tab"}<
6
6
  %i.icon-folder-close
7
- ブロック
7
+ =t('.block')
8
8
  %li
9
9
  %a#ruby-mode-button{:href => "#ruby-tab"}<
10
10
  %i.icon-pencil
@@ -12,17 +12,17 @@
12
12
 
13
13
  = form_tag(source_codes_load_path, id: "file-form", class: "navbar-form pull-right", method: "post", multipart: true) do
14
14
  %input#load-file{:type => 'file', :name => 'source_code[file]', :style => 'display: none'}
15
- %input#filename{:type => 'text', :class => 'span4', :placeholder => 'プログラムの名前を入れてね(例:01.rb)'}
15
+ %input#filename{:type => 'text', :class => 'span4', :placeholder => t('.msg_input_program_name')}
16
16
  = link_to '', source_codes_download_path, id: 'download-link', style: 'display: none', 'data-method' => 'delete'
17
17
 
18
18
  - if standalone?
19
19
  %button#run-button{:class => "btn btn-success"}<
20
20
  %i.icon-flag
21
- 実行
21
+ = t('.run')
22
22
  - else
23
23
  %button#download-button{:class => "btn btn-primary"}<
24
24
  %i.icon-download-alt
25
- ダウンロード
25
+ = t('.download')
26
26
 
27
27
  - if raspberrypi?
28
28
  - if standalone?
@@ -31,26 +31,26 @@
31
31
  - load_id = 'load-button'
32
32
  %button.btn{id: "#{load_id}", class: "btn btn-primary"}<
33
33
  %i.icon-folder-open
34
- ロード
34
+ = t('.load')
35
35
  - if standalone?
36
36
  %button#save-button.btn{class: "btn-primary"}<
37
37
  %i.icon-hdd
38
- セーブ
38
+ = t('.save')
39
39
  %button#check-button.btn{class: "btn-primary"}<
40
40
  %i.icon-check
41
- チェック
41
+ = t('.check')
42
42
  %button#reset-button.btn{class: "btn-primary"}<
43
43
  %i.icon-off
44
- リセット
44
+ = t('Reset')
45
45
  - if standalone?
46
46
  - if session[:username]
47
47
  %button#signout-button.btn{class: "btn-primary"}<
48
48
  %i.icon-eject
49
- ログアウト
49
+ = t('logout')
50
50
  - else
51
51
  %button#signout-button.btn{class: "btn-primary", style: "display: none"}<
52
52
  %i.icon-eject
53
- ログアウト
53
+ = t('logout')
54
54
 
55
55
  - else
56
56
  .btn-group
@@ -65,41 +65,41 @@
65
65
  %a{:id => "#{load_id}"}
66
66
  %h4
67
67
  %i.icon-folder-open
68
- ロード
68
+ = t('.load')
69
69
  - if standalone?
70
70
  %li
71
71
  %a#save-button
72
72
  %h4
73
73
  %i.icon-hdd
74
- セーブ
74
+ = t('.save')
75
75
  %li
76
76
  %a#check-button
77
77
  %h4
78
78
  %i.icon-check
79
- チェック
79
+ = t('.check')
80
80
  %li
81
81
  %a#reset-button
82
82
  %h4
83
83
  %i.icon-off
84
- リセット
84
+ = t('.reset')
85
85
  - if standalone?
86
86
  %li
87
87
  - if session[:username]
88
88
  %a#signout-button
89
89
  %h4
90
90
  %i.icon-eject
91
- ログアウト
91
+ = t('.logout')
92
92
  - else
93
93
  %a#signout-button{style: "display: none"}
94
94
  %h4
95
95
  %i.icon-eject
96
- ログアウト
96
+ = t('.logout')
97
97
 
98
98
  - if standalone?
99
99
  - if session[:username]
100
100
  %button#signin-button{class: "btn btn-danger", style: "display: none"}<
101
101
  %i.icon-user
102
- ログイン
102
+ = t('.login')
103
103
  %button#username-button{class: "btn btn-success"}<
104
104
  %i.icon-user
105
105
  %span#username-label<
@@ -107,7 +107,7 @@
107
107
  - else
108
108
  %button#signin-button{class: "btn btn-danger"}<
109
109
  %i.icon-user
110
- ログイン
110
+ = t('.login')
111
111
  %button#username-button{class: "btn btn-success", style: "display: none"}<
112
112
  %i.icon-user
113
113
  %span#username-label
@@ -12,6 +12,8 @@
12
12
  <meta name="msapplication-square310x310logo" content="large.png" />
13
13
  <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
14
14
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
15
+ <%= javascript_include_tag "blockly/msg/js/#{blockly_message_locale_name}" %>
16
+ <%= javascript_include_tag "msg/#{blockly_message_locale_name}" %>
15
17
  <%= csrf_meta_tags %>
16
18
  </head>
17
19
  <body>
data/bin/bundle CHANGED
File without changes
data/bin/rails CHANGED
File without changes
data/bin/rake CHANGED
File without changes
data/bin/smalruby-editor CHANGED
File without changes
data/config.ru CHANGED
File without changes
@@ -10,7 +10,7 @@ Bundler.require(:default, Rails.env) unless Rails.env == 'standalone'
10
10
  module SmalrubyEditor
11
11
  class Application < Rails::Application
12
12
  config.time_zone = 'Tokyo'
13
- # config.i18n.default_locale = :ja
13
+ config.i18n.default_locale = :ja
14
14
  config.colorize_logging = false
15
15
  config.filter_parameters += [:data]
16
16
  end
data/config/boot.rb CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -64,7 +64,10 @@ SmalrubyEditor::Application.configure do
64
64
  # Precompile additional assets.
65
65
  # application.js, application.css, and all non-JS/CSS in app/assets
66
66
  # folder are already added.
67
- # config.assets.precompile += %w( search.js )
67
+ config.assets.precompile += %w(
68
+ blockly/msg/js/*.js
69
+ msg/*.js
70
+ )
68
71
 
69
72
  # Ignore bad email addresses and do not raise email delivery errors.
70
73
  # Set this to true and configure the email server for immediate
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,23 +1,65 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
1
  en:
23
- hello: "Hello world"
2
+ common:
3
+ "ok": "OK"
4
+ cancel: "Cancel"
5
+
6
+ editor:
7
+ index:
8
+ block: "Block"
9
+ msg_input_program_name: "Input your program name(ex:01.rb)"
10
+ run: "Run"
11
+ download: "Download"
12
+ load: "Load"
13
+ save: "Save"
14
+ check: "Check"
15
+ reset: "Reset"
16
+ logout: "Logout"
17
+ login: "Login"
18
+
19
+ block_tab:
20
+ character: "Character"
21
+ new_character: "New Character"
22
+ direction_parameter: "Dir:"
23
+ stage: "Stage"
24
+
25
+ toolbox:
26
+ motion: "Motion"
27
+ motion_move: "Move"
28
+ motion_rotate: "Rotate"
29
+ motion_actuator: "Actuator"
30
+ looks: "Looks"
31
+ sound: "Sound"
32
+ pen: "Pen"
33
+ data: "Data"
34
+ data_variables: "Variables"
35
+ events: "Events"
36
+ control: "Control"
37
+ control_loop: "Loop"
38
+ control_wait: "Wait"
39
+ control_if: "If-Then"
40
+ sensing: "Sensing"
41
+ sensing_general: "General"
42
+ sensing_hardware: "Hardware"
43
+ operators: "Operators"
44
+ operators_calculate: "Calculate"
45
+ operators_string: "String"
46
+ operators_condition: "Condition"
47
+ etc: "More Blocks"
48
+ etc_ruby: "Ruby"
49
+ etc_hardware: "Hardware"
50
+ hello: "Hello!"
51
+ world: "world"
52
+ text: "text"
53
+
54
+ character_modal:
55
+ name: "Name"
56
+ x_position: "X"
57
+ y_position: "Y"
58
+ msg_input_name: "car1 and ball1 etc..."
59
+ direction: "Dir"
60
+
61
+ load_modal:
62
+ preset_programs: "Preset programs"
63
+ find_program: "Find program"
64
+ computer: "From this computer..."
65
+ remix: "Remix"
@@ -0,0 +1,65 @@
1
+ ja:
2
+ common:
3
+ "ok": "決めた!"
4
+ cancel: "やめる"
5
+
6
+ editor:
7
+ index:
8
+ block: "ブロック"
9
+ msg_input_program_name: "プログラムの名前を入れてね(例:01.rb)"
10
+ run: "実行"
11
+ download: "ダウンロード"
12
+ load: "ロード"
13
+ save: "セーブ"
14
+ check: "チェック"
15
+ reset: "リセット"
16
+ logout: "ログアウト"
17
+ login: "ログイン"
18
+
19
+ block_tab:
20
+ character: "キャラクター"
21
+ new_character: "新しいキャラクター"
22
+ direction_parameter: "向き:"
23
+ stage: "ステージ"
24
+
25
+ toolbox:
26
+ motion: "動き"
27
+ motion_move: "移動"
28
+ motion_rotate: "回転"
29
+ motion_actuator: "アクチュエータ"
30
+ looks: "見た目"
31
+ sound: "音"
32
+ pen: "ペン"
33
+ data: "データ"
34
+ data_variables: "変数"
35
+ events: "イベント(〜のとき)"
36
+ control: "制御"
37
+ control_loop: "繰り返し"
38
+ control_wait: "待つ"
39
+ control_if: "もし~なら"
40
+ sensing: "調べる"
41
+ sensing_general: "いろいろ"
42
+ sensing_hardware: "ハードウェア"
43
+ operators: "演算"
44
+ operators_calculate: "計算"
45
+ operators_string: "文字列"
46
+ operators_condition: "条件"
47
+ etc: "その他"
48
+ etc_ruby: "Ruby"
49
+ etc_hardware: "ハードウェア"
50
+ hello: "こんにちは!"
51
+ world: "あいうえお"
52
+ text: "文章"
53
+
54
+ character_modal:
55
+ name: "名前"
56
+ x_position: "X座標"
57
+ y_position: "Y座標"
58
+ msg_input_name: "car1やball1など"
59
+ direction: "向き"
60
+
61
+ load_modal:
62
+ preset_programs: "いろいろなプログラム"
63
+ find_program: "プログラムをさがす"
64
+ computer: "このコンピュータ"
65
+ remix: "リミックス"
data/config/routes.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  SmalrubyEditor::Application.routes.draw do
3
- root 'editor#index'
3
+ scope '(:locale)', locale: /en|ja/ do
4
+ root to: 'editor#index'
5
+ end
4
6
 
5
7
  match '/demo(/:filename)' => 'editor#demo',
6
8
  defaults: { filename: 'car_chase' }, via: :get
data/config/unicorn.rb CHANGED
File without changes
File without changes
data/db/schema.rb CHANGED
File without changes
data/db/seeds.rb CHANGED
File without changes
File without changes
File without changes
File without changes
data/demos/pong.rb.xml CHANGED
File without changes
data/demos/star.rb.xml CHANGED
File without changes
data/lib/assets/.keep CHANGED
File without changes
File without changes
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ module SmalrubyEditor
4
+ # app/assets以下のJavaScriptからBlocklyのメッセージを扱いやすくするた
5
+ # めのヘルパーモジュール
6
+ module BlocklyMessageHelper
7
+ def bm(name)
8
+ if /\A\./ =~ name
9
+ md = /(.*?):(?:\d+)/.match(caller[0])
10
+ filename = md[1]
11
+ prefix = filename.slice(%r"app/assets/javascripts/(.*)$", 1)
12
+ .gsub(/\..*\z/, '')
13
+ name = (prefix + name).gsub(/[\/.]/, '_')
14
+ end
15
+ "Smalruby.bm('#{name.upcase}')"
16
+ end
17
+ end
18
+ end
19
+
20
+ include SmalrubyEditor::BlocklyMessageHelper
@@ -1,3 +1,3 @@
1
1
  module SmalrubyEditor
2
- VERSION = '0.1.22'
2
+ VERSION = '0.1.23'
3
3
  end
data/lib/tasks/.keep CHANGED
File without changes
data/lib/tasks/gem.rake CHANGED
@@ -5,9 +5,7 @@ namespace :gem do
5
5
  end
6
6
 
7
7
  task 'assets:precompile:standalone' do
8
- Rails.env = ENV['RAILS_ENV'] = 'standalone'
9
- Rake::Task['assets:precompile'].reenable
10
- Rake::Task['assets:precompile'].invoke
8
+ system('rake assets:precompile RAILS_ENV=production')
11
9
  end
12
10
 
13
11
  task 'gem:build' => ['assets:clobber', 'assets:precompile:standalone']
File without changes