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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 110fbf90c4792bd8f54a5186633e8ffd33b3ed82
4
- data.tar.gz: e3cfd0fa9043b7d3420fd9cc7eb129f4374b343e
3
+ metadata.gz: 99927a415bc25fde573504cb2ae6be3be491e914
4
+ data.tar.gz: c3e1cb20d8631cd71993c90b2ced00dc315d8601
5
5
  SHA512:
6
- metadata.gz: 606b278152c481b67cead9cdb88c1858f72478ba7b3ed765996eca1c33785cb33900164a85a4061690369323ce58cf8dba7834a7a126a722f0d99948fc715572
7
- data.tar.gz: c8ffe0e9d3a24b2242478cbbf57b518b34f905e3046e449e9813adef841b3c40571825aa0be38328c4a32c35389b0785b3eae14ef0c778b79e28d128612250ad
6
+ metadata.gz: b852e86c45becba327cb475022316d3f9724d69ada0740c3b914f3c5ae4e12c59a3ab708c910aa799af635b452f37bfc002e4c8f489cf86d972abf994cf3cb90
7
+ data.tar.gz: d555b00d3c9d27b045892e5424057847de2c9aa696014728f43bc2e3d592ae7c1a0f593812a2d509215955c8bec9463dead48364a9d9d5c5bf1b5e66864530a7
data/.rubocop.yml CHANGED
@@ -20,8 +20,8 @@ EndOfLine:
20
20
  Enabled: false
21
21
 
22
22
  # diffが少なくなるためハッシュや配列の最後のカンマは許可する
23
- TrailingComma:
24
- Enabled: false
23
+ #TrailingComma:
24
+ # Enabled: false
25
25
 
26
26
  # デフォルトの10は短すぎる。80x25を基準として1画面に収まる長さとした。
27
27
  MethodLength:
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: 50px;
299
+ width: 40px;
299
300
  }
300
301
 
301
302
  .controls {
302
- margin-left: 50px + $modal-body-margin;
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['rotationStyle'] = @rotation_style if @rotation_style != 'free'
45
+ attrs['rotation_style'] = @rotation_style if @rotation_style != 'free'
46
46
  parent.add_element('character', attrs)
47
47
  end
48
48
  end
@@ -5,7 +5,8 @@ module RubyToBlock
5
5
  module CharacterOperation
6
6
  extend ActiveSupport::Concern
7
7
 
8
- CHAR_RE = '(?:(\S+)\.)?'
8
+ CHAR_NAME_RE = '([a-z]\S*)'
9
+ CHAR_RE = '(?:' + CHAR_NAME_RE + '\.)?'
9
10
 
10
11
  attr_accessor :character
11
12
 
@@ -0,0 +1,13 @@
1
+ # -*- coding: utf-8 -*-
2
+ module RubyToBlock
3
+ module Block
4
+ class ControlBreak < Base
5
+ blocknize '^\s*break\s*$', statement: true, inline: true
6
+
7
+ def self.process_match_data(md, context)
8
+ context.add_block(new)
9
+ true
10
+ end
11
+ end
12
+ end
13
+ end
@@ -2,7 +2,7 @@
2
2
  module RubyToBlock
3
3
  module Block
4
4
  class End < Base
5
- blocknize '^\s*end$', statement: true
5
+ blocknize '^\s*end\s*$', statement: true
6
6
 
7
7
  def self.process_match_data(md, context)
8
8
  ends_num = 1
@@ -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
@@ -0,0 +1,9 @@
1
+ # -*- coding: utf-8 -*-
2
+ module RubyToBlock
3
+ module Block
4
+ class MotionGoToMouse < CharacterMethodCall
5
+ blocknize '^\s*' + CHAR_RE + 'go_to\(:mouse\)\s*$',
6
+ statement: true
7
+ end
8
+ end
9
+ 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\(([^:)]+)\)\s*$',
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)
@@ -74,14 +74,11 @@ class SourceCode < ActiveRecord::Base
74
74
 
75
75
  def ruby_cmd
76
76
  if SmalrubyEditor.osx?
77
- dirs = [RbConfig::CONFIG['bindir']] + ENV['PATH'].split(';')
78
- dirs.each do |dir|
79
- path = Pathname('rsdl').expand_path(dir)
80
- return path if path.exist?
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
@@ -324,7 +324,7 @@
324
324
  -# 条件:偽
325
325
  %block{:type => "#{category}_false"}
326
326
 
327
- -#%category{:name => '変数', :custom => 'VARIABLE'}
327
+ %category{:name => '変数', :custom => 'VARIABLE'}
328
328
 
329
329
  - category = 'ruby'
330
330
  %category{:name => 'Ruby'}
@@ -122,3 +122,7 @@
122
122
  #text-editor
123
123
 
124
124
  = render 'signin_modal'
125
+
126
+ - if raspberrypi?
127
+ %script{type: "text/javascript"}
128
+ $(function() { $('div[id=":5"]').hide(); });
@@ -1,3 +1,3 @@
1
1
  module SmalrubyEditor
2
- VERSION = '0.1.16'
2
+ VERSION = '0.1.17'
3
3
  end
@@ -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.25'],
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.16
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-08 00:00:00.000000000 Z
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.25
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.25
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