mumuki-gobstones-runner 1.8.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/assets_server.rb +2 -0
- data/lib/expectations_hook.rb +6 -7
- data/lib/public/attires_disabled.svg +160 -0
- data/lib/public/attires_enabled.svg +128 -0
- data/lib/render/editor/editor.html +114 -21
- data/lib/render/editor/editor.js +1 -11
- data/lib/version_hook.rb +1 -1
- metadata +9 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 561d52e34d2397e6c275279ef3a3be3f1eb45264119dae56d3ed92ed5c6e1870
|
4
|
+
data.tar.gz: afe83c919264d47776f8630b9d5e8d3f75f3c982c85d8957884711151c5641a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a65eb760cddc62755d70d09db6676454c3f3d6971fc1ee74be634531c1f83c292d682adb149c2f5f8f7cd417c55396bd4cb41783a14155fb42a04dc42c3a3da
|
7
|
+
data.tar.gz: 52d99ad9e8879831dc709ff7c7b968da853fce9417c2cfaa08cd353a8efe69295589ac6398fe6fbd62260dda3448535af19e4263e1d7f9c6289a5e3f8f1a3b39
|
data/lib/assets_server.rb
CHANGED
@@ -44,4 +44,6 @@ class Mumukit::Server::App < Sinatra::Base
|
|
44
44
|
get_local_asset 'editor/editor.css', 'lib/render/editor/editor.css', 'text/css'
|
45
45
|
get_local_asset 'editor/editor.html', 'lib/render/editor/editor.html', 'text/html'
|
46
46
|
get_local_asset 'boom.png', 'lib/public/boom.png', 'image/png'
|
47
|
+
get_local_asset 'editor/attires_enabled.svg', 'lib/public/attires_enabled.svg', 'image/svg+xml'
|
48
|
+
get_local_asset 'editor/attires_disabled.svg', 'lib/public/attires_disabled.svg', 'image/svg+xml'
|
47
49
|
end
|
data/lib/expectations_hook.rb
CHANGED
@@ -12,13 +12,12 @@ class GobstonesExpectationsHook < Mumukit::Templates::MulangExpectationsHook
|
|
12
12
|
Mulang::Code.new(mulang_language, ast)
|
13
13
|
end
|
14
14
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
[expectations, exceptions]
|
15
|
+
def compile_expectations(request)
|
16
|
+
super(request).tap do |expectations|
|
17
|
+
request.batch.options[:subject].try do |subject|
|
18
|
+
expectations[:ast] << { binding: '*', inspection: "Declares:=#{subject}" }
|
19
|
+
end
|
20
|
+
end
|
22
21
|
end
|
23
22
|
|
24
23
|
def default_smell_exceptions
|
@@ -0,0 +1,160 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="65.75px"
|
5
|
+
height="28.25px" viewBox="0 0 65.75 28.25" enable-background="new 0 0 65.75 28.25" xml:space="preserve">
|
6
|
+
<g id="Layer_1" display="none">
|
7
|
+
<g display="inline">
|
8
|
+
<g>
|
9
|
+
<ellipse fill="none" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" cx="32.083" cy="15.878" rx="7.914" ry="5.081"/>
|
10
|
+
<circle fill="#FF4081" stroke="#FF4081" stroke-miterlimit="10" cx="32.084" cy="15.878" r="2.96"/>
|
11
|
+
<g>
|
12
|
+
|
13
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.057" y1="7.298" x2="32.057" y2="10.371"/>
|
14
|
+
|
15
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="23.094" y1="11.167" x2="25.364" y2="12.917"/>
|
16
|
+
|
17
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.671" y1="7.603" x2="29.523" y2="10.595"/>
|
18
|
+
|
19
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="35.32" y1="7.603" x2="34.468" y2="10.595"/>
|
20
|
+
|
21
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="25.541" y1="8.834" x2="27.055" y2="11.555"/>
|
22
|
+
|
23
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="41.072" y1="11.167" x2="38.802" y2="12.917"/>
|
24
|
+
|
25
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="38.625" y1="8.834" x2="37.113" y2="11.555"/>
|
26
|
+
</g>
|
27
|
+
</g>
|
28
|
+
<circle fill="#FFFFFF" cx="31.175" cy="15.25" r="1.194"/>
|
29
|
+
</g>
|
30
|
+
</g>
|
31
|
+
<g id="Layer_2" display="none">
|
32
|
+
<g display="inline">
|
33
|
+
<g>
|
34
|
+
<ellipse fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" cx="32.083" cy="15.878" rx="7.914" ry="5.081"/>
|
35
|
+
<circle fill="#AAAAAA" stroke="#AAAAAA" stroke-miterlimit="10" cx="32.084" cy="15.878" r="2.96"/>
|
36
|
+
<g>
|
37
|
+
|
38
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.057" y1="7.298" x2="32.057" y2="10.371"/>
|
39
|
+
|
40
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="23.094" y1="11.167" x2="25.364" y2="12.917"/>
|
41
|
+
|
42
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.671" y1="7.603" x2="29.523" y2="10.595"/>
|
43
|
+
|
44
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="35.32" y1="7.603" x2="34.468" y2="10.595"/>
|
45
|
+
|
46
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="25.541" y1="8.834" x2="27.055" y2="11.555"/>
|
47
|
+
|
48
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="41.072" y1="11.167" x2="38.802" y2="12.917"/>
|
49
|
+
|
50
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="38.625" y1="8.834" x2="37.113" y2="11.555"/>
|
51
|
+
</g>
|
52
|
+
</g>
|
53
|
+
<circle fill="#FFFFFF" cx="31.175" cy="15.25" r="1.194"/>
|
54
|
+
</g>
|
55
|
+
</g>
|
56
|
+
<g id="Layer_3" display="none">
|
57
|
+
<g display="inline">
|
58
|
+
<path fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" d="M49.431,14.125c0,5.31-4.304,9.612-9.612,9.612
|
59
|
+
H25.182c-5.309,0-9.612-4.303-9.612-9.612l0,0c0-5.31,4.304-9.612,9.612-9.612h14.637C45.127,4.513,49.431,8.815,49.431,14.125
|
60
|
+
L49.431,14.125z"/>
|
61
|
+
<circle fill="#AAAAAA" cx="26.111" cy="14.126" r="7.196"/>
|
62
|
+
</g>
|
63
|
+
</g>
|
64
|
+
<g id="Layer_4" display="none">
|
65
|
+
<g display="inline">
|
66
|
+
<path fill="#FF4081" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" d="M15.569,14.125c0,5.31,4.304,9.612,9.612,9.612
|
67
|
+
h14.637c5.309,0,9.612-4.303,9.612-9.612l0,0c0-5.31-4.304-9.612-9.612-9.612H25.182C19.873,4.513,15.569,8.815,15.569,14.125
|
68
|
+
L15.569,14.125z"/>
|
69
|
+
<circle fill="#FFFFFF" cx="38.889" cy="14.126" r="7.196"/>
|
70
|
+
</g>
|
71
|
+
</g>
|
72
|
+
<g id="Layer_5" display="none">
|
73
|
+
<g display="inline">
|
74
|
+
<g>
|
75
|
+
<g>
|
76
|
+
|
77
|
+
<ellipse fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" cx="12.969" cy="15.875" rx="7.914" ry="5.081"/>
|
78
|
+
<circle fill="#AAAAAA" stroke="#AAAAAA" stroke-miterlimit="10" cx="12.97" cy="15.875" r="2.96"/>
|
79
|
+
<g>
|
80
|
+
|
81
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="12.942" y1="7.294" x2="12.942" y2="10.367"/>
|
82
|
+
|
83
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.979" y1="11.164" x2="6.25" y2="12.914"/>
|
84
|
+
|
85
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="9.557" y1="7.599" x2="10.409" y2="10.591"/>
|
86
|
+
|
87
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.206" y1="7.599" x2="15.354" y2="10.591"/>
|
88
|
+
|
89
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="6.427" y1="8.831" x2="7.94" y2="11.551"/>
|
90
|
+
|
91
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="21.958" y1="11.164" x2="19.688" y2="12.914"/>
|
92
|
+
|
93
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="19.511" y1="8.831" x2="17.999" y2="11.551"/>
|
94
|
+
</g>
|
95
|
+
</g>
|
96
|
+
<circle fill="#FFFFFF" cx="12.061" cy="15.246" r="1.194"/>
|
97
|
+
</g>
|
98
|
+
<path fill="#FF4081" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" d="M27.909,14.125c0,5.31,4.304,9.612,9.612,9.612
|
99
|
+
h14.637c5.309,0,9.612-4.303,9.612-9.612l0,0c0-5.31-4.304-9.612-9.612-9.612H37.521C32.213,4.513,27.909,8.815,27.909,14.125
|
100
|
+
L27.909,14.125z"/>
|
101
|
+
<circle fill="#FFFFFF" cx="51.229" cy="14.126" r="7.196"/>
|
102
|
+
<g>
|
103
|
+
<g>
|
104
|
+
|
105
|
+
<ellipse fill="none" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" cx="12.969" cy="15.875" rx="7.914" ry="5.081"/>
|
106
|
+
<circle fill="#FF4081" stroke="#FF4081" stroke-miterlimit="10" cx="12.97" cy="15.875" r="2.96"/>
|
107
|
+
<g>
|
108
|
+
|
109
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="12.942" y1="7.294" x2="12.942" y2="10.367"/>
|
110
|
+
|
111
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.979" y1="11.164" x2="6.25" y2="12.914"/>
|
112
|
+
|
113
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="9.557" y1="7.599" x2="10.409" y2="10.591"/>
|
114
|
+
|
115
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.206" y1="7.599" x2="15.354" y2="10.591"/>
|
116
|
+
|
117
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="6.427" y1="8.831" x2="7.94" y2="11.551"/>
|
118
|
+
|
119
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="21.958" y1="11.164" x2="19.688" y2="12.914"/>
|
120
|
+
|
121
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="19.511" y1="8.831" x2="17.999" y2="11.551"/>
|
122
|
+
</g>
|
123
|
+
</g>
|
124
|
+
<circle fill="#FFFFFF" cx="12.061" cy="15.246" r="1.194"/>
|
125
|
+
</g>
|
126
|
+
</g>
|
127
|
+
</g>
|
128
|
+
<g id="Layer_6">
|
129
|
+
<g>
|
130
|
+
<g>
|
131
|
+
<g>
|
132
|
+
|
133
|
+
<ellipse fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" cx="12.969" cy="15.875" rx="7.914" ry="5.081"/>
|
134
|
+
<circle fill="#AAAAAA" stroke="#AAAAAA" stroke-miterlimit="10" cx="12.97" cy="15.875" r="2.96"/>
|
135
|
+
<g>
|
136
|
+
|
137
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="12.942" y1="7.294" x2="12.942" y2="10.367"/>
|
138
|
+
|
139
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.979" y1="11.164" x2="6.25" y2="12.914"/>
|
140
|
+
|
141
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="9.557" y1="7.599" x2="10.409" y2="10.591"/>
|
142
|
+
|
143
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.206" y1="7.599" x2="15.354" y2="10.591"/>
|
144
|
+
|
145
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="6.427" y1="8.831" x2="7.94" y2="11.551"/>
|
146
|
+
|
147
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="21.958" y1="11.164" x2="19.688" y2="12.914"/>
|
148
|
+
|
149
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="19.511" y1="8.831" x2="17.999" y2="11.551"/>
|
150
|
+
</g>
|
151
|
+
</g>
|
152
|
+
<circle fill="#FFFFFF" cx="12.061" cy="15.246" r="1.194"/>
|
153
|
+
</g>
|
154
|
+
<path fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" d="M61.771,14.125c0,5.31-4.304,9.612-9.612,9.612
|
155
|
+
H37.521c-5.309,0-9.612-4.303-9.612-9.612l0,0c0-5.31,4.304-9.612,9.612-9.612h14.637C57.467,4.513,61.771,8.815,61.771,14.125
|
156
|
+
L61.771,14.125z"/>
|
157
|
+
<circle fill="#AAAAAA" cx="38.451" cy="14.126" r="7.196"/>
|
158
|
+
</g>
|
159
|
+
</g>
|
160
|
+
</svg>
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="65.75px"
|
5
|
+
height="28.25px" viewBox="0 0 65.75 28.25" enable-background="new 0 0 65.75 28.25" xml:space="preserve">
|
6
|
+
<g id="Layer_1" display="none">
|
7
|
+
<g display="inline">
|
8
|
+
<g>
|
9
|
+
<ellipse fill="none" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" cx="32.083" cy="15.878" rx="7.914" ry="5.081"/>
|
10
|
+
<circle fill="#FF4081" stroke="#FF4081" stroke-miterlimit="10" cx="32.084" cy="15.878" r="2.96"/>
|
11
|
+
<g>
|
12
|
+
|
13
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.057" y1="7.298" x2="32.057" y2="10.371"/>
|
14
|
+
|
15
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="23.094" y1="11.167" x2="25.364" y2="12.917"/>
|
16
|
+
|
17
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.671" y1="7.603" x2="29.523" y2="10.595"/>
|
18
|
+
|
19
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="35.32" y1="7.603" x2="34.468" y2="10.595"/>
|
20
|
+
|
21
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="25.541" y1="8.834" x2="27.055" y2="11.555"/>
|
22
|
+
|
23
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="41.072" y1="11.167" x2="38.802" y2="12.917"/>
|
24
|
+
|
25
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="38.625" y1="8.834" x2="37.113" y2="11.555"/>
|
26
|
+
</g>
|
27
|
+
</g>
|
28
|
+
<circle fill="#FFFFFF" cx="31.175" cy="15.25" r="1.194"/>
|
29
|
+
</g>
|
30
|
+
</g>
|
31
|
+
<g id="Layer_2" display="none">
|
32
|
+
<g display="inline">
|
33
|
+
<g>
|
34
|
+
<ellipse fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" cx="32.083" cy="15.878" rx="7.914" ry="5.081"/>
|
35
|
+
<circle fill="#AAAAAA" stroke="#AAAAAA" stroke-miterlimit="10" cx="32.084" cy="15.878" r="2.96"/>
|
36
|
+
<g>
|
37
|
+
|
38
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="32.057" y1="7.298" x2="32.057" y2="10.371"/>
|
39
|
+
|
40
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="23.094" y1="11.167" x2="25.364" y2="12.917"/>
|
41
|
+
|
42
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="28.671" y1="7.603" x2="29.523" y2="10.595"/>
|
43
|
+
|
44
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="35.32" y1="7.603" x2="34.468" y2="10.595"/>
|
45
|
+
|
46
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="25.541" y1="8.834" x2="27.055" y2="11.555"/>
|
47
|
+
|
48
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="41.072" y1="11.167" x2="38.802" y2="12.917"/>
|
49
|
+
|
50
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="38.625" y1="8.834" x2="37.113" y2="11.555"/>
|
51
|
+
</g>
|
52
|
+
</g>
|
53
|
+
<circle fill="#FFFFFF" cx="31.175" cy="15.25" r="1.194"/>
|
54
|
+
</g>
|
55
|
+
</g>
|
56
|
+
<g id="Layer_3" display="none">
|
57
|
+
<g display="inline">
|
58
|
+
<path fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" d="M49.431,14.125c0,5.31-4.304,9.612-9.612,9.612
|
59
|
+
H25.182c-5.309,0-9.612-4.303-9.612-9.612l0,0c0-5.31,4.304-9.612,9.612-9.612h14.637C45.127,4.513,49.431,8.815,49.431,14.125
|
60
|
+
L49.431,14.125z"/>
|
61
|
+
<circle fill="#AAAAAA" cx="26.111" cy="14.126" r="7.196"/>
|
62
|
+
</g>
|
63
|
+
</g>
|
64
|
+
<g id="Layer_4" display="none">
|
65
|
+
<g display="inline">
|
66
|
+
<path fill="#FF4081" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" d="M15.569,14.125c0,5.31,4.304,9.612,9.612,9.612
|
67
|
+
h14.637c5.309,0,9.612-4.303,9.612-9.612l0,0c0-5.31-4.304-9.612-9.612-9.612H25.182C19.873,4.513,15.569,8.815,15.569,14.125
|
68
|
+
L15.569,14.125z"/>
|
69
|
+
<circle fill="#FFFFFF" cx="38.889" cy="14.126" r="7.196"/>
|
70
|
+
</g>
|
71
|
+
</g>
|
72
|
+
<g id="Layer_5">
|
73
|
+
<g>
|
74
|
+
<g>
|
75
|
+
<g>
|
76
|
+
|
77
|
+
<ellipse fill="none" stroke="#AAAAAA" stroke-width="2" stroke-miterlimit="10" cx="12.969" cy="15.875" rx="7.914" ry="5.081"/>
|
78
|
+
<circle fill="#AAAAAA" stroke="#AAAAAA" stroke-miterlimit="10" cx="12.97" cy="15.875" r="2.96"/>
|
79
|
+
<g>
|
80
|
+
|
81
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="12.942" y1="7.294" x2="12.942" y2="10.367"/>
|
82
|
+
|
83
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.979" y1="11.164" x2="6.25" y2="12.914"/>
|
84
|
+
|
85
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="9.557" y1="7.599" x2="10.409" y2="10.591"/>
|
86
|
+
|
87
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.206" y1="7.599" x2="15.354" y2="10.591"/>
|
88
|
+
|
89
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="6.427" y1="8.831" x2="7.94" y2="11.551"/>
|
90
|
+
|
91
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="21.958" y1="11.164" x2="19.688" y2="12.914"/>
|
92
|
+
|
93
|
+
<line fill="#FFFFFF" stroke="#AAAAAA" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="19.511" y1="8.831" x2="17.999" y2="11.551"/>
|
94
|
+
</g>
|
95
|
+
</g>
|
96
|
+
<circle fill="#FFFFFF" cx="12.061" cy="15.246" r="1.194"/>
|
97
|
+
</g>
|
98
|
+
<path fill="#FF4081" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" d="M27.909,14.125c0,5.31,4.304,9.612,9.612,9.612
|
99
|
+
h14.637c5.309,0,9.612-4.303,9.612-9.612l0,0c0-5.31-4.304-9.612-9.612-9.612H37.521C32.213,4.513,27.909,8.815,27.909,14.125
|
100
|
+
L27.909,14.125z"/>
|
101
|
+
<circle fill="#FFFFFF" cx="51.229" cy="14.126" r="7.196"/>
|
102
|
+
<g>
|
103
|
+
<g>
|
104
|
+
|
105
|
+
<ellipse fill="none" stroke="#FF4081" stroke-width="2" stroke-miterlimit="10" cx="12.969" cy="15.875" rx="7.914" ry="5.081"/>
|
106
|
+
<circle fill="#FF4081" stroke="#FF4081" stroke-miterlimit="10" cx="12.97" cy="15.875" r="2.96"/>
|
107
|
+
<g>
|
108
|
+
|
109
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="12.942" y1="7.294" x2="12.942" y2="10.367"/>
|
110
|
+
|
111
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="3.979" y1="11.164" x2="6.25" y2="12.914"/>
|
112
|
+
|
113
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="9.557" y1="7.599" x2="10.409" y2="10.591"/>
|
114
|
+
|
115
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="16.206" y1="7.599" x2="15.354" y2="10.591"/>
|
116
|
+
|
117
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="6.427" y1="8.831" x2="7.94" y2="11.551"/>
|
118
|
+
|
119
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="21.958" y1="11.164" x2="19.688" y2="12.914"/>
|
120
|
+
|
121
|
+
<line fill="#FFFFFF" stroke="#FF4081" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="19.511" y1="8.831" x2="17.999" y2="11.551"/>
|
122
|
+
</g>
|
123
|
+
</g>
|
124
|
+
<circle fill="#FFFFFF" cx="12.061" cy="15.246" r="1.194"/>
|
125
|
+
</g>
|
126
|
+
</g>
|
127
|
+
</g>
|
128
|
+
</svg>
|
@@ -2,17 +2,41 @@
|
|
2
2
|
<link href="./gobstones-code-runner.html" rel="import"/>
|
3
3
|
|
4
4
|
<dom-module id="mu-gobstones-custom-editor">
|
5
|
+
|
5
6
|
<template>
|
6
|
-
<gs-element-blockly
|
7
|
-
|
8
|
-
|
9
|
-
media="
|
7
|
+
<gs-element-blockly id="blocklyElement"
|
8
|
+
read-only="{{readOnly}}"
|
9
|
+
media="{{mediaUrl}}"
|
10
|
+
local-media="{{localMediaUrl}}"
|
11
|
+
></gs-element-blockly>
|
12
|
+
<gs-element-blockly id="blocklyTmp"
|
13
|
+
style="display: none"
|
14
|
+
media="{{mediaUrl}}"
|
15
|
+
localMediaUrl="{{localMediaUrl}}"
|
16
|
+
></gs-element-blockly>
|
10
17
|
</template>
|
11
18
|
|
12
19
|
<script>
|
20
|
+
function postpone(action) {
|
21
|
+
return setTimeout(action, 50);
|
22
|
+
}
|
23
|
+
|
24
|
+
function gbsBoardRemoveBorder(board) {
|
25
|
+
board._setBorderOff();
|
26
|
+
board.updateStyles();
|
27
|
+
}
|
28
|
+
|
13
29
|
Polymer({
|
14
30
|
is: 'mu-gobstones-custom-editor',
|
15
31
|
properties: {
|
32
|
+
mediaUrl: {
|
33
|
+
type: String,
|
34
|
+
value: "https://github.com/Program-AR/blockly-package/raw/v0.0.15/media/"
|
35
|
+
},
|
36
|
+
localMediaUrl: {
|
37
|
+
type: String,
|
38
|
+
value: "https://github.com/Program-AR/gs-element-blockly/raw/0.19.1/media/"
|
39
|
+
},
|
16
40
|
readOnly: {
|
17
41
|
type: Boolean,
|
18
42
|
value: false
|
@@ -24,8 +48,20 @@
|
|
24
48
|
},
|
25
49
|
|
26
50
|
attached: function () {
|
51
|
+
|
52
|
+
const setBlocklySounds = () => {
|
53
|
+
Blockly.WorkspaceAudio.prototype.preload = () => {
|
54
|
+
for (var soundName in this.SOUNDS_) {
|
55
|
+
let sound = this.SOUNDS_[soundName];
|
56
|
+
sound.volume = 0.01;
|
57
|
+
let playPromise = sound.play();
|
58
|
+
playPromise && playPromise.then(sound.pause.bind(sound));
|
59
|
+
if (goog.userAgent.IPAD || goog.userAgent.IPHONE) break;
|
60
|
+
}
|
61
|
+
};
|
62
|
+
};
|
63
|
+
|
27
64
|
const setBlocklyColors = () => {
|
28
|
-
if (typeof Blockly === 'undefined' || !Blockly.CUSTOM_COLORS) return setTimeout(setBlocklyColors, 50);
|
29
65
|
Blockly.HSV_SATURATION = 0.64;
|
30
66
|
Blockly.HSV_VALUE = 1;
|
31
67
|
|
@@ -65,6 +101,12 @@
|
|
65
101
|
});
|
66
102
|
};
|
67
103
|
|
104
|
+
const setBlocklyCustomSettings = () => {
|
105
|
+
if (typeof Blockly === 'undefined' || !Blockly.CUSTOM_COLORS) return postpone(setBlocklyCustomSettings);
|
106
|
+
setBlocklySounds();
|
107
|
+
setBlocklyColors();
|
108
|
+
};
|
109
|
+
|
68
110
|
const updateFields = () => {
|
69
111
|
const blockly = this.getBlockly();
|
70
112
|
|
@@ -119,7 +161,7 @@
|
|
119
161
|
};
|
120
162
|
|
121
163
|
const initialize = () => {
|
122
|
-
|
164
|
+
postpone(() => {
|
123
165
|
const blockly = this.getBlockly();
|
124
166
|
|
125
167
|
if (!blockly || !blockly.workspace) return initialize();
|
@@ -130,16 +172,16 @@
|
|
130
172
|
|
131
173
|
this.setTeacherActions(blockly);
|
132
174
|
this._setInitialXml(blockly);
|
133
|
-
this._initializeWorkspace(blockly)
|
134
|
-
|
135
|
-
|
136
|
-
blockly._onresize();
|
175
|
+
this._initializeWorkspace(blockly, () => {
|
176
|
+
localOnResize();
|
177
|
+
blockly._onresize();
|
137
178
|
|
138
|
-
|
139
|
-
|
179
|
+
this._subscribeToWorkspace(blockly, updateFields);
|
180
|
+
});
|
181
|
+
});
|
140
182
|
};
|
141
183
|
|
142
|
-
|
184
|
+
setBlocklyCustomSettings();
|
143
185
|
initialize();
|
144
186
|
},
|
145
187
|
|
@@ -184,8 +226,8 @@
|
|
184
226
|
}
|
185
227
|
},
|
186
228
|
|
187
|
-
_initializeWorkspace: function(blockly) {
|
188
|
-
|
229
|
+
_initializeWorkspace: function(blockly, callback) {
|
230
|
+
postpone(() => {
|
189
231
|
const value = $("#mu-custom-editor-value")[0].value;
|
190
232
|
|
191
233
|
blockly.workspaceXml = value || (
|
@@ -194,6 +236,8 @@
|
|
194
236
|
: blockly.initialXml
|
195
237
|
);
|
196
238
|
blockly.scrollToBlock();
|
239
|
+
|
240
|
+
callback();
|
197
241
|
});
|
198
242
|
},
|
199
243
|
|
@@ -268,13 +312,8 @@
|
|
268
312
|
</script>
|
269
313
|
</dom-module>
|
270
314
|
|
271
|
-
|
272
315
|
<dom-module id="kids-reset-button">
|
273
|
-
|
274
316
|
<template>
|
275
|
-
<style>
|
276
|
-
</style>
|
277
|
-
|
278
317
|
<div>
|
279
318
|
<paper-fab id="gbsResetButton"
|
280
319
|
icon="av:replay"
|
@@ -357,7 +396,7 @@
|
|
357
396
|
|
358
397
|
const setInitialState = () => {
|
359
398
|
const initialBoard = this._getTargetBoard();
|
360
|
-
if (!initialBoard.size) return
|
399
|
+
if (!initialBoard.size) return postpone(setInitialState);
|
361
400
|
|
362
401
|
this.initialState = {
|
363
402
|
size: initialBoard.size,
|
@@ -456,6 +495,8 @@
|
|
456
495
|
} else {
|
457
496
|
finalBoard.update(table, head);
|
458
497
|
}
|
498
|
+
|
499
|
+
gbsBoardRemoveBorder(finalBoard);
|
459
500
|
},
|
460
501
|
|
461
502
|
_highlight: function (region) {
|
@@ -574,3 +615,55 @@
|
|
574
615
|
});
|
575
616
|
</script>
|
576
617
|
</dom-module>
|
618
|
+
|
619
|
+
<dom-module id="gs-attire-toggle-button">
|
620
|
+
<style>
|
621
|
+
.button {
|
622
|
+
padding: 5px;
|
623
|
+
cursor: pointer;
|
624
|
+
float: right;
|
625
|
+
}
|
626
|
+
</style>
|
627
|
+
|
628
|
+
<template>
|
629
|
+
<template is="dom-if" if="{{shouldDisplay}}">
|
630
|
+
<div class="button" on-click="_onButtonClick">
|
631
|
+
<template is="dom-if" if="{{isEnabled}}">
|
632
|
+
<img src="./attires_enabled.svg">
|
633
|
+
</template>
|
634
|
+
<template is="dom-if" if="{{!isEnabled}}">
|
635
|
+
<img src="./attires_disabled.svg">
|
636
|
+
</template>
|
637
|
+
</div>
|
638
|
+
</template>
|
639
|
+
</template>
|
640
|
+
|
641
|
+
<script>
|
642
|
+
Polymer({
|
643
|
+
is: 'gs-attire-toggle-button',
|
644
|
+
properties: {
|
645
|
+
isEnabled: {
|
646
|
+
type: Boolean,
|
647
|
+
value: true
|
648
|
+
}
|
649
|
+
},
|
650
|
+
|
651
|
+
ready: function () {
|
652
|
+
this.boards = $(".mu-kids-states").find("gs-board");
|
653
|
+
setTimeout(() => {
|
654
|
+
this.shouldDisplay = this.boards.toArray().some(board => board.attire);
|
655
|
+
}, 500);
|
656
|
+
},
|
657
|
+
|
658
|
+
_onButtonClick: function () {
|
659
|
+
this.isEnabled = !this.isEnabled;
|
660
|
+
|
661
|
+
this.boards.each((__, board) => {
|
662
|
+
if (this.isEnabled) board.detectAttire();
|
663
|
+
else board.attire = null;
|
664
|
+
gbsBoardRemoveBorder(board);
|
665
|
+
});
|
666
|
+
}
|
667
|
+
});
|
668
|
+
</script>
|
669
|
+
</dom-module>
|
data/lib/render/editor/editor.js
CHANGED
@@ -1,15 +1,5 @@
|
|
1
1
|
$(document).ready(function () {
|
2
2
|
$(".mu-kids-submit-button").html("<kids-submit-button></kids-submit-button>");
|
3
3
|
$(".mu-kids-reset-button").html("<kids-reset-button></kids-reset-button>");
|
4
|
-
|
5
|
-
Blockly.WorkspaceAudio.prototype.preload = function () {
|
6
|
-
for (var soundName in this.SOUNDS_) {
|
7
|
-
var sound = this.SOUNDS_[soundName];
|
8
|
-
sound.volume = 0.01;
|
9
|
-
var playPromise = sound.play();
|
10
|
-
playPromise && playPromise.then(sound.pause.bind(sound));
|
11
|
-
if (goog.userAgent.IPAD || goog.userAgent.IPHONE) break;
|
12
|
-
}
|
13
|
-
};
|
14
|
-
|
4
|
+
$(".mu-kids-states").prepend("<gs-attire-toggle-button></gs-attire-toggle-button>");
|
15
5
|
});
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-gobstones-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.26'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.26'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra-cross_origin
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.19'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.19'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: gobstones-code-runner
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,6 +173,8 @@ files:
|
|
173
173
|
- lib/metadata_hook.rb
|
174
174
|
- lib/multiple_executions_runner.rb
|
175
175
|
- lib/precompile_hook.rb
|
176
|
+
- lib/public/attires_disabled.svg
|
177
|
+
- lib/public/attires_enabled.svg
|
176
178
|
- lib/public/boom.png
|
177
179
|
- lib/render/boards.html.erb
|
178
180
|
- lib/render/editor/editor.css
|
@@ -183,7 +185,7 @@ files:
|
|
183
185
|
- lib/render/with_renderer.rb
|
184
186
|
- lib/test_hook.rb
|
185
187
|
- lib/version_hook.rb
|
186
|
-
homepage: http://github.com/
|
188
|
+
homepage: http://github.com/mumuki/mumuki-gobstones-runner
|
187
189
|
licenses:
|
188
190
|
- MIT
|
189
191
|
metadata: {}
|