smalruby-editor 0.1.16 → 0.1.17
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.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/README.rdoc +2 -0
- data/app/assets/stylesheets/editor.css.scss +5 -2
- data/app/models/concerns/ruby_to_block/block/character.rb +1 -1
- data/app/models/concerns/ruby_to_block/block/character_operation.rb +2 -1
- data/app/models/concerns/ruby_to_block/block/control_beark.rb +13 -0
- data/app/models/concerns/ruby_to_block/block/end.rb +1 -1
- data/app/models/concerns/ruby_to_block/block/motion_go_to_character.rb +24 -0
- data/app/models/concerns/ruby_to_block/block/motion_go_to_mouse.rb +9 -0
- data/app/models/concerns/ruby_to_block/block/motion_point_towards_character.rb +1 -1
- data/app/models/source_code.rb +4 -7
- data/app/views/editor/_toolbox.html.haml +1 -1
- data/app/views/editor/index.html.haml +4 -0
- data/lib/smalruby_editor/version.rb +1 -1
- data/smalruby-editor.gemspec +1 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99927a415bc25fde573504cb2ae6be3be491e914
|
4
|
+
data.tar.gz: c3e1cb20d8631cd71993c90b2ced00dc315d8601
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b852e86c45becba327cb475022316d3f9724d69ada0740c3b914f3c5ae4e12c59a3ab708c910aa799af635b452f37bfc002e4c8f489cf86d972abf994cf3cb90
|
7
|
+
data.tar.gz: d555b00d3c9d27b045892e5424057847de2c9aa696014728f43bc2e3d592ae7c1a0f593812a2d509215955c8bec9463dead48364a9d9d5c5bf1b5e66864530a7
|
data/.rubocop.yml
CHANGED
data/README.rdoc
CHANGED
@@ -17,6 +17,8 @@ The Smalruby(smɔ́ːrúːbi) Project will provide a Ruby learning environment f
|
|
17
17
|
|
18
18
|
== Installation (for User)
|
19
19
|
|
20
|
+
Windows(only Japanese): https://github.com/smalruby/smalruby-installer-for-windows/wiki
|
21
|
+
|
20
22
|
requirements:
|
21
23
|
|
22
24
|
* Windows or UNIX like OS (Mac OS X, Linux, etc...)
|
@@ -257,6 +257,7 @@ $left-pane-width: $character-size + $margin * 2;
|
|
257
257
|
|
258
258
|
#character-modal-left-pane {
|
259
259
|
width: $left-pane-width;
|
260
|
+
height: $modal-height - $modal-body-margin * 2;
|
260
261
|
overflow: hidden;
|
261
262
|
|
262
263
|
#character-modal-preview {
|
@@ -295,11 +296,11 @@ $left-pane-width: $character-size + $margin * 2;
|
|
295
296
|
margin-bottom: 8px;
|
296
297
|
|
297
298
|
.control-label {
|
298
|
-
width:
|
299
|
+
width: 40px;
|
299
300
|
}
|
300
301
|
|
301
302
|
.controls {
|
302
|
-
margin-left:
|
303
|
+
margin-left: 40px + 5px;
|
303
304
|
|
304
305
|
input[type=range] {
|
305
306
|
padding: 0;
|
@@ -315,6 +316,8 @@ $left-pane-width: $character-size + $margin * 2;
|
|
315
316
|
}
|
316
317
|
|
317
318
|
#character-modal-right-pane {
|
319
|
+
height: $modal-height - $modal-body-margin * 2;
|
320
|
+
|
318
321
|
overflow: hidden;
|
319
322
|
|
320
323
|
#character-modal-costume-selector {
|
@@ -42,7 +42,7 @@ module RubyToBlock
|
|
42
42
|
'angle' => @angle,
|
43
43
|
'costumes' => @costumes.join(',')
|
44
44
|
}
|
45
|
-
attrs['
|
45
|
+
attrs['rotation_style'] = @rotation_style if @rotation_style != 'free'
|
46
46
|
parent.add_element('character', attrs)
|
47
47
|
end
|
48
48
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
module RubyToBlock
|
3
|
+
module Block
|
4
|
+
class MotionGoToCharacter < CharacterMethodCall
|
5
|
+
blocknize '^\s*' + CHAR_RE + 'go_to\(' + CHAR_NAME_RE + '\)\s*$',
|
6
|
+
statement: true
|
7
|
+
|
8
|
+
def self.process_match_data(md, context)
|
9
|
+
md2 = regexp.match(md[type])
|
10
|
+
|
11
|
+
name = md2[2]
|
12
|
+
name.strip!
|
13
|
+
c = context.characters[name]
|
14
|
+
return false unless c
|
15
|
+
|
16
|
+
block = new(fields: { CHAR: name })
|
17
|
+
_, context.current_block =
|
18
|
+
*add_child_or_create_character_new_block(context, md2[1], block)
|
19
|
+
|
20
|
+
true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
module RubyToBlock
|
3
3
|
module Block
|
4
4
|
class MotionPointTowardsCharacter < CharacterMethodCall
|
5
|
-
blocknize '^\s*' + CHAR_RE + 'point_towards\(
|
5
|
+
blocknize '^\s*' + CHAR_RE + 'point_towards\(' + CHAR_NAME_RE + '\)\s*$',
|
6
6
|
statement: true
|
7
7
|
|
8
8
|
def self.process_match_data(md, context)
|
data/app/models/source_code.rb
CHANGED
@@ -74,14 +74,11 @@ class SourceCode < ActiveRecord::Base
|
|
74
74
|
|
75
75
|
def ruby_cmd
|
76
76
|
if SmalrubyEditor.osx?
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
end
|
77
|
+
Pathname(Gem.bin_path('rsdl', 'rsdl'))
|
78
|
+
else
|
79
|
+
Pathname(RbConfig::CONFIG['RUBY_INSTALL_NAME'])
|
80
|
+
.expand_path(RbConfig::CONFIG['bindir'])
|
82
81
|
end
|
83
|
-
Pathname(RbConfig::CONFIG['RUBY_INSTALL_NAME'])
|
84
|
-
.expand_path(RbConfig::CONFIG['bindir'])
|
85
82
|
end
|
86
83
|
|
87
84
|
def open3_capture3_ruby_c
|
data/smalruby-editor.gemspec
CHANGED
@@ -68,7 +68,7 @@ Gem::Specification.new do |spec|
|
|
68
68
|
['launchy'],
|
69
69
|
['mime-types', '~> 1.16'],
|
70
70
|
['haml-rails'],
|
71
|
-
['smalruby', '~> 0.0.
|
71
|
+
['smalruby', '~> 0.0.26'],
|
72
72
|
]
|
73
73
|
runtime_dependencies << ['therubyracer'] unless is_windows
|
74
74
|
runtime_dependencies.each do |args|
|
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.1.
|
4
|
+
version: 0.1.17
|
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-06-
|
11
|
+
date: 2014-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - ~>
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.0.
|
187
|
+
version: 0.0.26
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ~>
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.0.
|
194
|
+
version: 0.0.26
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: therubyracer
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -315,6 +315,7 @@ files:
|
|
315
315
|
- app/models/concerns/ruby_to_block/block/character_method_call.rb
|
316
316
|
- app/models/concerns/ruby_to_block/block/character_new.rb
|
317
317
|
- app/models/concerns/ruby_to_block/block/character_operation.rb
|
318
|
+
- app/models/concerns/ruby_to_block/block/control_beark.rb
|
318
319
|
- app/models/concerns/ruby_to_block/block/control_if.rb
|
319
320
|
- app/models/concerns/ruby_to_block/block/control_loop.rb
|
320
321
|
- app/models/concerns/ruby_to_block/block/control_sleep.rb
|
@@ -341,6 +342,8 @@ files:
|
|
341
342
|
- app/models/concerns/ruby_to_block/block/math_number.rb
|
342
343
|
- app/models/concerns/ruby_to_block/block/motion_change_x_by.rb
|
343
344
|
- app/models/concerns/ruby_to_block/block/motion_change_y_by.rb
|
345
|
+
- app/models/concerns/ruby_to_block/block/motion_go_to_character.rb
|
346
|
+
- app/models/concerns/ruby_to_block/block/motion_go_to_mouse.rb
|
344
347
|
- app/models/concerns/ruby_to_block/block/motion_move.rb
|
345
348
|
- app/models/concerns/ruby_to_block/block/motion_point_towards_character.rb
|
346
349
|
- app/models/concerns/ruby_to_block/block/motion_point_towards_mouse.rb
|
@@ -604,10 +607,10 @@ files:
|
|
604
607
|
- vendor/assets/javascripts/blockly/msg/js/ja.js
|
605
608
|
- vendor/assets/javascripts/jquery.blockUI.js
|
606
609
|
- vendor/assets/stylesheets/.keep
|
607
|
-
- public/assets/application-7f560d8d6d224f87269691c57ca9a376.css
|
608
|
-
- public/assets/application-7f560d8d6d224f87269691c57ca9a376.css.gz
|
609
610
|
- public/assets/application-842ac8f5aa3fcc87bbb0e8b3a0fef5d7.js
|
610
611
|
- public/assets/application-842ac8f5aa3fcc87bbb0e8b3a0fef5d7.js.gz
|
612
|
+
- public/assets/application-b31ceba36a60591e488903231db4cb37.css
|
613
|
+
- public/assets/application-b31ceba36a60591e488903231db4cb37.css.gz
|
611
614
|
- public/assets/favicon-a37c90b368fd8ed436cb8f9e9396465c.ico
|
612
615
|
- public/assets/jquery-ui/animated-overlay-c48c87b7a95316f4698484e3b85ee4aa.gif
|
613
616
|
- public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-58b63faadd031ca3db096dfdffd90224.png
|