smalruby-editor 0.1.12 → 0.1.13
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/app/assets/javascripts/blocks/looks.js.coffee.erb +4 -0
- data/app/assets/javascripts/blocks/motion.js.coffee.erb +2 -2
- data/app/assets/javascripts/models/character.js.coffee +4 -0
- data/app/assets/javascripts/smalruby.js.coffee +11 -0
- data/app/assets/javascripts/views/character_modal_view.js.coffee +1 -1
- data/app/assets/javascripts/views/character_selector_view.js.coffee +1 -1
- data/app/controllers/application_controller.rb +12 -1
- data/app/views/editor/_character_modal.html.haml +1 -1
- data/app/views/editor/_toolbox.html.haml +1 -1
- data/app/views/editor/index.html.haml +67 -37
- data/lib/smalruby_editor/version.rb +3 -3
- data/public/smalruby/assets/ryu1.png +0 -0
- data/public/smalruby/assets/ryu2.png +0 -0
- data/public/smalruby/assets/taichi1.png +0 -0
- data/public/smalruby/assets/taichi2.png +0 -0
- data/smalruby-editor.gemspec +1 -1
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17277cef9c6ce58a37bf2d2e412378a6befadc0b
|
4
|
+
data.tar.gz: 2afbaa8fbd1c5aa68a4ff71aef08c6dc6f15ea32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d9b84d9977731cc904d14781e374f86f55f742211d4a461914f326458ff26cec68c5e8c6feba3ea36e30e3df005e9c083e419ed50d943b5137bb72d3c015b45
|
7
|
+
data.tar.gz: 4c34b221638dc4d3a509ef44cbc3aacd32a1929dbba622d4e57ac9adaffe69f24c37328c833d4b2c65045074998be4136e2d7bcd049ec5e15ab2084baddbc687
|
@@ -151,6 +151,10 @@ Blockly.Blocks['<%= n %>'] =
|
|
151
151
|
['猫2', 'cat2.png'],
|
152
152
|
['猫3', 'cat3.png'],
|
153
153
|
['かえる1', 'frog1.png'],
|
154
|
+
['コウガ リュウ1', 'ryu1.png'],
|
155
|
+
['コウガ リュウ2', 'ryu2.png'],
|
156
|
+
['イタチのタイチ', 'taichi1.png'],
|
157
|
+
['イタチのタイチ', 'taichi2.png'],
|
154
158
|
]
|
155
159
|
@setHelpUrl('')
|
156
160
|
@setColour(<%= color %>)
|
@@ -24,11 +24,11 @@ Blockly.Ruby['<%= n %>'] = (block) ->
|
|
24
24
|
Blockly.Ruby.characterMethodCall_('move', "#{arg}")
|
25
25
|
|
26
26
|
# 時計回りに( )度回す
|
27
|
-
#
|
27
|
+
# 反時計回りに( )度回す
|
28
28
|
<%
|
29
29
|
[
|
30
30
|
['right', '', ''],
|
31
|
-
['left', '
|
31
|
+
['left', '反', '-'],
|
32
32
|
].each do |suffix, label_prefix, sign|
|
33
33
|
n = "#{category}_rotate_#{suffix}"
|
34
34
|
%>
|
@@ -44,6 +44,17 @@ window.Smalruby =
|
|
44
44
|
interpolate: /{{=([\s\S]+?)}}/
|
45
45
|
})
|
46
46
|
|
47
|
+
# HACK: 一度開いたジャンルを2回クリックしても閉じないように修正
|
48
|
+
Blockly.Toolbox.TreeNode.prototype.onMouseDown = (e) ->
|
49
|
+
if @hasChildren() && @isUserCollapsible_
|
50
|
+
@toggle()
|
51
|
+
@select()
|
52
|
+
else if @isSelected()
|
53
|
+
#@getTree().setSelectedItem(null)
|
54
|
+
else
|
55
|
+
@select()
|
56
|
+
@updateRow()
|
57
|
+
|
47
58
|
@Collections.CharacterSet = new Smalruby.CharacterSet()
|
48
59
|
|
49
60
|
@Views.MainMenuView = new Smalruby.MainMenuView()
|
@@ -102,7 +102,7 @@ Smalruby.CharacterModalView = Backbone.View.extend
|
|
102
102
|
onChangeAngle: (model, value, options) ->
|
103
103
|
@$el.find('input[name="character[angle]"]').val(value)
|
104
104
|
$('#character_angle_value').text("#{value}°")
|
105
|
-
rotate = "rotate(#{
|
105
|
+
rotate = "rotate(#{value}deg)"
|
106
106
|
$('#character-modal-character').css
|
107
107
|
'-moz-transform': rotate
|
108
108
|
'-webkit-transform': rotate
|
@@ -49,7 +49,7 @@ Smalruby.CharacterSelectorView = Backbone.View.extend({
|
|
49
49
|
if character.get('using')
|
50
50
|
removeButton.hide()
|
51
51
|
|
52
|
-
rotate = "rotate(#{character.get('angle')
|
52
|
+
rotate = "rotate(#{character.get('angle')}deg)"
|
53
53
|
img = html.find('img')
|
54
54
|
img.css
|
55
55
|
'-moz-transform': rotate
|
@@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
|
|
4
4
|
# For APIs, you may want to use :null_session instead.
|
5
5
|
protect_from_forgery with: :exception
|
6
6
|
|
7
|
-
helper_method :standalone?
|
7
|
+
helper_method :standalone?, :raspberrypi?
|
8
8
|
|
9
9
|
private
|
10
10
|
|
@@ -22,6 +22,17 @@ class ApplicationController < ActionController::Base
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
+
# Raspberry Piかどうかを返す
|
26
|
+
def raspberrypi?
|
27
|
+
if Rails.env != 'test' &&
|
28
|
+
(ENV['SMALRUBY_EDITOR_RASPBERRYPI_MODE'] ||
|
29
|
+
File.exist?(Rails.root.join('tmp', 'raspberrypi')))
|
30
|
+
true
|
31
|
+
else
|
32
|
+
RbConfig::CONFIG['arch'] == 'armv6l-linux-eabihf'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
25
36
|
def check_whether_standalone
|
26
37
|
unless standalone?
|
27
38
|
fail "#{self.class.name}##{action_name}はstandaloneモードのみの機能です"
|
@@ -5,7 +5,7 @@
|
|
5
5
|
#character-modal-costume-selector
|
6
6
|
.row-fluid
|
7
7
|
%ul.thumbnails
|
8
|
-
- %w(car1 car2 car3 car4 cat1 cat2 cat3 frog1 ball1 ball2 ball3 ball4 ball5 ball6).each do |name|
|
8
|
+
- %w(car1 car2 car3 car4 cat1 cat2 cat3 frog1 ball1 ball2 ball3 ball4 ball5 ball6 ryu1 ryu2 taichi1 taichi2).each do |name|
|
9
9
|
%li
|
10
10
|
%a.thumbnail
|
11
11
|
%img{:src => "/smalruby/assets/#{name}.png", :alt => "#{name}.png"}
|
@@ -24,47 +24,77 @@
|
|
24
24
|
%i.icon-download-alt
|
25
25
|
ダウンロード
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
- if raspberrypi?
|
28
|
+
- if standalone?
|
29
|
+
- load_id = 'load-local-button'
|
30
|
+
- else
|
31
|
+
- load_id = 'load-button'
|
32
|
+
%button.btn{id: "#{load_id}", class: "btn btn-primary"}<
|
33
|
+
%i.icon-folder-open
|
34
|
+
ロード
|
35
|
+
- if standalone?
|
36
|
+
%button#save-button.btn{class: "btn-primary"}<
|
37
|
+
%i.icon-hdd
|
38
|
+
セーブ
|
39
|
+
%button#check-button.btn{class: "btn-primary"}<
|
40
|
+
%i.icon-check
|
41
|
+
チェック
|
42
|
+
%button#reset-button.btn{class: "btn-primary"}<
|
43
|
+
%i.icon-off
|
44
|
+
リセット
|
45
|
+
- if standalone?
|
46
|
+
- if session[:username]
|
47
|
+
%button#signout-button.btn{class: "btn-primary"}<
|
48
|
+
%i.icon-eject
|
49
|
+
ログアウト
|
50
|
+
- else
|
51
|
+
%button#signout-button.btn{class: "btn-primary", style: "display: none"}<
|
52
|
+
%i.icon-eject
|
53
|
+
ログアウト
|
54
|
+
|
55
|
+
- else
|
56
|
+
.btn-group
|
57
|
+
%a#submenu-button{:class => "dropdown-toggle btn btn-primary", :"data-toggle" => "dropdown", :href => "#"}
|
58
|
+
%i.icon-reorder
|
59
|
+
%ul#submenu.dropdown-menu{:class => "pull-right"}
|
60
|
+
%li
|
61
|
+
- if standalone?
|
62
|
+
- load_id = 'load-local-button'
|
63
|
+
- else
|
64
|
+
- load_id = 'load-button'
|
65
|
+
%a{:id => "#{load_id}"}
|
66
|
+
%h4
|
67
|
+
%i.icon-folder-open
|
68
|
+
ロード
|
32
69
|
- if standalone?
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
%i.icon-folder-open
|
39
|
-
ロード
|
40
|
-
- if standalone?
|
70
|
+
%li
|
71
|
+
%a#save-button
|
72
|
+
%h4
|
73
|
+
%i.icon-hdd
|
74
|
+
セーブ
|
41
75
|
%li
|
42
|
-
%a#
|
76
|
+
%a#check-button
|
43
77
|
%h4
|
44
|
-
%i.icon-
|
45
|
-
|
46
|
-
%li
|
47
|
-
%a#check-button
|
48
|
-
%h4
|
49
|
-
%i.icon-check
|
50
|
-
チェック
|
51
|
-
%li
|
52
|
-
%a#reset-button
|
53
|
-
%h4
|
54
|
-
%i.icon-off
|
55
|
-
リセット
|
56
|
-
- if standalone?
|
78
|
+
%i.icon-check
|
79
|
+
チェック
|
57
80
|
%li
|
58
|
-
-
|
59
|
-
%
|
60
|
-
%
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
%
|
66
|
-
%
|
67
|
-
|
81
|
+
%a#reset-button
|
82
|
+
%h4
|
83
|
+
%i.icon-off
|
84
|
+
リセット
|
85
|
+
- if standalone?
|
86
|
+
%li
|
87
|
+
- if session[:username]
|
88
|
+
%a#signout-button
|
89
|
+
%h4
|
90
|
+
%i.icon-eject
|
91
|
+
ログアウト
|
92
|
+
- else
|
93
|
+
%a#signout-button{style: "display: none"}
|
94
|
+
%h4
|
95
|
+
%i.icon-eject
|
96
|
+
ログアウト
|
97
|
+
|
68
98
|
- if standalone?
|
69
99
|
- if session[:username]
|
70
100
|
%button#signin-button{class: "btn btn-danger", style: "display: none"}<
|
@@ -1,3 +1,3 @@
|
|
1
|
-
module SmalrubyEditor
|
2
|
-
VERSION = '0.1.
|
3
|
-
end
|
1
|
+
module SmalrubyEditor
|
2
|
+
VERSION = '0.1.13'
|
3
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.21'],
|
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.13
|
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-05-
|
11
|
+
date: 2014-05-16 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.21
|
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.21
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: therubyracer
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -466,6 +466,10 @@ files:
|
|
466
466
|
- public/smalruby/assets/piano_re.wav
|
467
467
|
- public/smalruby/assets/piano_si.wav
|
468
468
|
- public/smalruby/assets/piano_so.wav
|
469
|
+
- public/smalruby/assets/ryu1.png
|
470
|
+
- public/smalruby/assets/ryu2.png
|
471
|
+
- public/smalruby/assets/taichi1.png
|
472
|
+
- public/smalruby/assets/taichi2.png
|
469
473
|
- public/square.png
|
470
474
|
- public/tiny.png
|
471
475
|
- public/wide.png
|
@@ -594,10 +598,10 @@ files:
|
|
594
598
|
- vendor/assets/javascripts/blockly/msg/js/ja.js
|
595
599
|
- vendor/assets/javascripts/jquery.blockUI.js
|
596
600
|
- vendor/assets/stylesheets/.keep
|
601
|
+
- public/assets/application-0f9a877d144f84320a10770dfdc5ddd8.js
|
602
|
+
- public/assets/application-0f9a877d144f84320a10770dfdc5ddd8.js.gz
|
597
603
|
- public/assets/application-53d651da3309caa498cc0ca6616dbead.css
|
598
604
|
- public/assets/application-53d651da3309caa498cc0ca6616dbead.css.gz
|
599
|
-
- public/assets/application-669cbc2df60729c4b12d739af7595cc6.js
|
600
|
-
- public/assets/application-669cbc2df60729c4b12d739af7595cc6.js.gz
|
601
605
|
- public/assets/favicon-a37c90b368fd8ed436cb8f9e9396465c.ico
|
602
606
|
- public/assets/jquery-ui/animated-overlay-c48c87b7a95316f4698484e3b85ee4aa.gif
|
603
607
|
- public/assets/jquery-ui/ui-bg_flat_0_aaaaaa_40x100-58b63faadd031ca3db096dfdffd90224.png
|