web_sandbox_console 0.1.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +143 -6
- data/app/assets/images/web_sandbox_console/logo-icon.png +0 -0
- data/app/assets/javascripts/web_sandbox_console/application.js +0 -1
- data/app/assets/javascripts/web_sandbox_console/code_editor.js +0 -0
- data/app/assets/javascripts/web_sandbox_console/codemirror.js +9778 -0
- data/app/assets/javascripts/web_sandbox_console/matchbrackets.js +158 -0
- data/app/assets/javascripts/web_sandbox_console/ruby.js +298 -0
- data/app/assets/stylesheets/web_sandbox_console/application.css +85 -14
- data/app/assets/stylesheets/web_sandbox_console/codemirror.css +349 -0
- data/app/assets/stylesheets/web_sandbox_console/common.css +231 -0
- data/app/assets/stylesheets/web_sandbox_console/docs.css +274 -0
- data/app/assets/stylesheets/web_sandbox_console/home.css +47 -0
- data/app/assets/stylesheets/web_sandbox_console/lucario.css +45 -0
- data/app/controllers/web_sandbox_console/application_controller.rb +4 -0
- data/app/controllers/web_sandbox_console/authorization_controller.rb +82 -0
- data/app/controllers/web_sandbox_console/home_controller.rb +44 -4
- data/app/views/layouts/web_sandbox_console/application.html.erb +82 -11
- data/app/views/web_sandbox_console/authorization/auth_page.html.erb +33 -0
- data/app/views/web_sandbox_console/home/do_view_file.js.erb +14 -0
- data/app/views/web_sandbox_console/home/download_page.html.erb +22 -0
- data/app/views/web_sandbox_console/home/eval_code.js.erb +1 -1
- data/app/views/web_sandbox_console/home/index.html.erb +34 -7
- data/app/views/web_sandbox_console/home/view_file.html.erb +39 -0
- data/config/routes.rb +12 -0
- data/lib/generators/web_sandbox_console/templates/web_sandbox_console.rb +20 -3
- data/lib/generators/web_sandbox_console/templates/web_sandbox_console.yml +5 -0
- data/lib/generators/web_sandbox_console/web_sandbox_console_generator.rb +5 -0
- data/lib/web_sandbox_console.rb +4 -0
- data/lib/web_sandbox_console/common.rb +29 -8
- data/lib/web_sandbox_console/configuration.rb +9 -1
- data/lib/web_sandbox_console/safe_ruby.rb +116 -16
- data/lib/web_sandbox_console/sandbox.rb +119 -20
- data/lib/web_sandbox_console/sandbox_error.rb +4 -0
- data/lib/web_sandbox_console/version.rb +1 -1
- data/lib/web_sandbox_console/view_file.rb +257 -0
- data/lib/web_sandbox_console/view_file_error.rb +4 -0
- metadata +28 -6
- data/app/jobs/web_sandbox_console/application_job.rb +0 -4
@@ -0,0 +1,231 @@
|
|
1
|
+
body {
|
2
|
+
background: #fff;
|
3
|
+
font-family: "Montserrat", sans-serif !important;
|
4
|
+
margin: 0;
|
5
|
+
overflow-x: hidden;
|
6
|
+
color: #67757c;
|
7
|
+
font-weight: 300;
|
8
|
+
font-size: 14px;
|
9
|
+
}
|
10
|
+
|
11
|
+
* {
|
12
|
+
outline: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
a{ text-decoration:none}
|
16
|
+
|
17
|
+
#main-wrapper {
|
18
|
+
width: 100%;
|
19
|
+
overflow: hidden;
|
20
|
+
}
|
21
|
+
|
22
|
+
.topbar {
|
23
|
+
position: fixed;
|
24
|
+
width: 100%;
|
25
|
+
z-index: 50;
|
26
|
+
background: #ffffff;
|
27
|
+
}
|
28
|
+
|
29
|
+
.topbar .top-navbar {
|
30
|
+
min-height: 70px;
|
31
|
+
padding: 0px;
|
32
|
+
}
|
33
|
+
|
34
|
+
.topbar .top-navbar .navbar-header {
|
35
|
+
line-height: 72px;
|
36
|
+
padding-left: 10px;
|
37
|
+
border-right: 1px solid rgba(120, 130, 140, 0.13);
|
38
|
+
}
|
39
|
+
|
40
|
+
.navbar-header {
|
41
|
+
width: 200px;
|
42
|
+
flex-shrink: 0;
|
43
|
+
}
|
44
|
+
|
45
|
+
.topbar .top-navbar .navbar-header .navbar-brand {
|
46
|
+
margin-right: 0px;
|
47
|
+
padding-bottom: 0px;
|
48
|
+
padding-top: 0px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.navbar-brand {
|
52
|
+
display: inline-block;
|
53
|
+
padding-top: .3125rem;
|
54
|
+
padding-bottom: .3125rem;
|
55
|
+
margin-right: 1rem;
|
56
|
+
font-size: 1.25rem;
|
57
|
+
line-height: inherit;
|
58
|
+
white-space: nowrap;
|
59
|
+
color: rgba(0,0,0,.9);
|
60
|
+
}
|
61
|
+
|
62
|
+
.navbar-light .navbar-brand {
|
63
|
+
color: rgba(0,0,0,.9);
|
64
|
+
}
|
65
|
+
|
66
|
+
.topbar .navbar-collapse {
|
67
|
+
padding: 0px;
|
68
|
+
border-bottom: 1px solid rgba(120, 130, 140, 0.13);
|
69
|
+
display: flex!important;
|
70
|
+
align-items: center;
|
71
|
+
}
|
72
|
+
|
73
|
+
.left-sidebar {
|
74
|
+
position: fixed;
|
75
|
+
width: 210px;
|
76
|
+
height: 100%;
|
77
|
+
top: 0px;
|
78
|
+
z-index: 20;
|
79
|
+
padding-top: 70px;
|
80
|
+
background: #fff;
|
81
|
+
border-right: 1px solid rgba(120, 130, 140, 0.13);
|
82
|
+
}
|
83
|
+
|
84
|
+
.ps {
|
85
|
+
-ms-touch-action: auto;
|
86
|
+
touch-action: auto;
|
87
|
+
overflow: hidden !important;
|
88
|
+
-ms-overflow-style: none;
|
89
|
+
}
|
90
|
+
|
91
|
+
.scroll-sidebar {
|
92
|
+
height: 100%;
|
93
|
+
}
|
94
|
+
|
95
|
+
.sidebar-nav {
|
96
|
+
background: #fff;
|
97
|
+
padding: 15px 0 0 0px;
|
98
|
+
}
|
99
|
+
|
100
|
+
.sidebar-nav ul {
|
101
|
+
margin: 0px;
|
102
|
+
padding: 0px;
|
103
|
+
}
|
104
|
+
|
105
|
+
.sidebar-nav > ul > li {
|
106
|
+
margin-bottom: 8px;
|
107
|
+
margin-top: 8px;
|
108
|
+
}
|
109
|
+
|
110
|
+
.sidebar-nav ul li {
|
111
|
+
list-style: none;
|
112
|
+
}
|
113
|
+
|
114
|
+
.sidebar-nav > ul > li > a {
|
115
|
+
border-left: 3px solid transparent;
|
116
|
+
}
|
117
|
+
|
118
|
+
.sidebar-nav > ul > li > a:hover {
|
119
|
+
color: #20aee3;
|
120
|
+
font-size: 16px;
|
121
|
+
}
|
122
|
+
|
123
|
+
.menu-active {
|
124
|
+
color: #20aee3;
|
125
|
+
font-size: 16px;
|
126
|
+
}
|
127
|
+
|
128
|
+
.sidebar-nav ul li a {
|
129
|
+
color: #8d97ad;
|
130
|
+
padding: 10px 35px 10px 15px;
|
131
|
+
display: block;
|
132
|
+
font-size: 15px;
|
133
|
+
font-weight: 400;
|
134
|
+
}
|
135
|
+
|
136
|
+
.waves-effect {
|
137
|
+
position: relative;
|
138
|
+
cursor: pointer;
|
139
|
+
display: inline-block;
|
140
|
+
overflow: hidden;
|
141
|
+
-webkit-user-select: none;
|
142
|
+
-moz-user-select: none;
|
143
|
+
-ms-user-select: none;
|
144
|
+
user-select: none;
|
145
|
+
-webkit-tap-highlight-color: transparent;
|
146
|
+
vertical-align: middle;
|
147
|
+
z-index: 1;
|
148
|
+
will-change: opacity, transform;
|
149
|
+
}
|
150
|
+
|
151
|
+
.topbar .top-navbar .navbar-header .navbar-brand b {
|
152
|
+
line-height: 70px;
|
153
|
+
display: inline-block;
|
154
|
+
font-weight: bolder;
|
155
|
+
}
|
156
|
+
|
157
|
+
img {
|
158
|
+
vertical-align: middle;
|
159
|
+
border-style: none;
|
160
|
+
}
|
161
|
+
|
162
|
+
.sidebar-nav > ul > li > a i {
|
163
|
+
color: #787f91;
|
164
|
+
}
|
165
|
+
|
166
|
+
.sidebar-nav > ul > li > a i {
|
167
|
+
width: 38px;
|
168
|
+
font-size: 24px;
|
169
|
+
display: inline-block;
|
170
|
+
vertical-align: middle;
|
171
|
+
color: #787f91;
|
172
|
+
}
|
173
|
+
|
174
|
+
.fa {
|
175
|
+
display: inline-block;
|
176
|
+
font: normal normal normal 14px/1 FontAwesome;
|
177
|
+
font-size: inherit;
|
178
|
+
text-rendering: auto;
|
179
|
+
-webkit-font-smoothing: antialiased;
|
180
|
+
-moz-osx-font-smoothing: grayscale;
|
181
|
+
}
|
182
|
+
|
183
|
+
.page-wrapper {
|
184
|
+
background: #f6f9fa;
|
185
|
+
padding-bottom: 60px;
|
186
|
+
position: relative;
|
187
|
+
margin-left: 200px;
|
188
|
+
/*padding-top: 70px;*/
|
189
|
+
margin-right: 30px;
|
190
|
+
min-height: 800px;
|
191
|
+
z-index: 100
|
192
|
+
}
|
193
|
+
|
194
|
+
.container-fluid {
|
195
|
+
padding: 25px 25px;
|
196
|
+
}
|
197
|
+
|
198
|
+
.container-fluid {
|
199
|
+
width: 100%;
|
200
|
+
margin-right: auto;
|
201
|
+
margin-left: auto;
|
202
|
+
padding-right: 15px;
|
203
|
+
padding-left: 15px;
|
204
|
+
width: 100%;
|
205
|
+
}
|
206
|
+
|
207
|
+
.navbar-nav {
|
208
|
+
display: -ms-flexbox;
|
209
|
+
display: flex;
|
210
|
+
-ms-flex-direction: column;
|
211
|
+
flex-direction: column;
|
212
|
+
padding-left: 0;
|
213
|
+
margin-bottom: 0;
|
214
|
+
list-style: none;
|
215
|
+
flex-direction: row;
|
216
|
+
}
|
217
|
+
|
218
|
+
.mr-auto {
|
219
|
+
margin-right: auto!important;
|
220
|
+
}
|
221
|
+
|
222
|
+
|
223
|
+
pre {
|
224
|
+
white-space: pre-wrap; /* Since CSS 2.1 */
|
225
|
+
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
226
|
+
white-space: -pre-wrap; /* Opera 4-6 */
|
227
|
+
white-space: -o-pre-wrap; /* Opera 7 */
|
228
|
+
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
229
|
+
line-height: 18px;
|
230
|
+
margin-top: 0px;
|
231
|
+
}
|
@@ -0,0 +1,274 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: 'Source Sans Pro';
|
3
|
+
font-style: normal;
|
4
|
+
font-weight: 400;
|
5
|
+
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(//themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff');
|
6
|
+
}
|
7
|
+
|
8
|
+
body, html { margin: 0; padding: 0; height: 100%; }
|
9
|
+
section, article { display: block; padding: 0; }
|
10
|
+
|
11
|
+
body {
|
12
|
+
background: #f8f8f8;
|
13
|
+
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
14
|
+
line-height: 1.5;
|
15
|
+
}
|
16
|
+
|
17
|
+
p { margin-top: 0; }
|
18
|
+
|
19
|
+
h2, h3, h1 {
|
20
|
+
font-weight: normal;
|
21
|
+
margin-bottom: .7em;
|
22
|
+
}
|
23
|
+
h1 { font-size: 140%; }
|
24
|
+
h2 { font-size: 120%; }
|
25
|
+
h3 { font-size: 110%; }
|
26
|
+
article > h2:first-child, section:first-child > h2 { margin-top: 0; }
|
27
|
+
|
28
|
+
#nav h1 {
|
29
|
+
margin-right: 12px;
|
30
|
+
margin-top: 0;
|
31
|
+
margin-bottom: 2px;
|
32
|
+
color: #d30707;
|
33
|
+
letter-spacing: .5px;
|
34
|
+
}
|
35
|
+
|
36
|
+
a, a:visited, a:link, .quasilink {
|
37
|
+
color: #A21313;
|
38
|
+
}
|
39
|
+
|
40
|
+
em {
|
41
|
+
padding-right: 2px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.quasilink {
|
45
|
+
cursor: pointer;
|
46
|
+
}
|
47
|
+
|
48
|
+
article {
|
49
|
+
max-width: 700px;
|
50
|
+
margin: 0 0 0 160px;
|
51
|
+
border-left: 2px solid #E30808;
|
52
|
+
border-right: 1px solid #ddd;
|
53
|
+
padding: 30px 50px 100px 50px;
|
54
|
+
background: white;
|
55
|
+
z-index: 2;
|
56
|
+
position: relative;
|
57
|
+
min-height: 100%;
|
58
|
+
box-sizing: border-box;
|
59
|
+
-moz-box-sizing: border-box;
|
60
|
+
}
|
61
|
+
|
62
|
+
#nav {
|
63
|
+
position: fixed;
|
64
|
+
padding-top: 30px;
|
65
|
+
max-height: 100%;
|
66
|
+
box-sizing: -moz-border-box;
|
67
|
+
box-sizing: border-box;
|
68
|
+
overflow-y: auto;
|
69
|
+
left: 0; right: none;
|
70
|
+
width: 160px;
|
71
|
+
text-align: right;
|
72
|
+
z-index: 1;
|
73
|
+
}
|
74
|
+
|
75
|
+
@media screen and (min-width: 1000px) {
|
76
|
+
article {
|
77
|
+
margin: 0 auto;
|
78
|
+
}
|
79
|
+
#nav {
|
80
|
+
right: 50%;
|
81
|
+
width: auto;
|
82
|
+
border-right: 349px solid transparent;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
#nav ul {
|
87
|
+
display: block;
|
88
|
+
margin: 0; padding: 0;
|
89
|
+
margin-bottom: 32px;
|
90
|
+
}
|
91
|
+
|
92
|
+
#nav a {
|
93
|
+
text-decoration: none;
|
94
|
+
}
|
95
|
+
|
96
|
+
#nav li {
|
97
|
+
display: block;
|
98
|
+
margin-bottom: 4px;
|
99
|
+
}
|
100
|
+
|
101
|
+
#nav li ul {
|
102
|
+
font-size: 80%;
|
103
|
+
margin-bottom: 0;
|
104
|
+
display: none;
|
105
|
+
}
|
106
|
+
|
107
|
+
#nav li.active ul {
|
108
|
+
display: block;
|
109
|
+
}
|
110
|
+
|
111
|
+
#nav li li a {
|
112
|
+
padding-right: 20px;
|
113
|
+
display: inline-block;
|
114
|
+
}
|
115
|
+
|
116
|
+
#nav ul a {
|
117
|
+
color: black;
|
118
|
+
padding: 0 7px 1px 11px;
|
119
|
+
}
|
120
|
+
|
121
|
+
#nav ul a.active, #nav ul a:hover {
|
122
|
+
border-bottom: 1px solid #E30808;
|
123
|
+
margin-bottom: -1px;
|
124
|
+
color: #E30808;
|
125
|
+
}
|
126
|
+
|
127
|
+
#logo {
|
128
|
+
border: 0;
|
129
|
+
margin-right: 12px;
|
130
|
+
margin-bottom: 25px;
|
131
|
+
}
|
132
|
+
|
133
|
+
section {
|
134
|
+
border-top: 1px solid #E30808;
|
135
|
+
margin: 1.5em 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
section.first {
|
139
|
+
border: none;
|
140
|
+
margin-top: 0;
|
141
|
+
}
|
142
|
+
|
143
|
+
#demo {
|
144
|
+
position: relative;
|
145
|
+
}
|
146
|
+
|
147
|
+
#demolist {
|
148
|
+
position: absolute;
|
149
|
+
right: 5px;
|
150
|
+
top: 5px;
|
151
|
+
z-index: 25;
|
152
|
+
}
|
153
|
+
|
154
|
+
.yinyang {
|
155
|
+
position: absolute;
|
156
|
+
top: -10px;
|
157
|
+
left: 0; right: 0;
|
158
|
+
margin: auto;
|
159
|
+
display: block;
|
160
|
+
height: 120px;
|
161
|
+
}
|
162
|
+
|
163
|
+
.actions {
|
164
|
+
margin: 1em 0 0;
|
165
|
+
min-height: 100px;
|
166
|
+
position: relative;
|
167
|
+
}
|
168
|
+
|
169
|
+
.actionspicture {
|
170
|
+
pointer-events: none;
|
171
|
+
position: absolute;
|
172
|
+
height: 100px;
|
173
|
+
top: 0; left: 0; right: 0;
|
174
|
+
}
|
175
|
+
|
176
|
+
.actionlink {
|
177
|
+
pointer-events: auto;
|
178
|
+
font-family: arial;
|
179
|
+
font-size: 80%;
|
180
|
+
font-weight: bold;
|
181
|
+
position: absolute;
|
182
|
+
top: 0; bottom: 0;
|
183
|
+
line-height: 1;
|
184
|
+
height: 1em;
|
185
|
+
margin: auto;
|
186
|
+
}
|
187
|
+
|
188
|
+
.actionlink.download {
|
189
|
+
color: white;
|
190
|
+
right: 50%;
|
191
|
+
margin-right: 13px;
|
192
|
+
text-shadow: -1px 1px 3px #b00, -1px -1px 3px #b00, 1px 0px 3px #b00;
|
193
|
+
}
|
194
|
+
|
195
|
+
.actionlink.fund {
|
196
|
+
color: #b00;
|
197
|
+
left: 50%;
|
198
|
+
margin-left: 15px;
|
199
|
+
}
|
200
|
+
|
201
|
+
.actionlink:hover {
|
202
|
+
text-decoration: underline;
|
203
|
+
}
|
204
|
+
|
205
|
+
.actionlink a {
|
206
|
+
color: inherit;
|
207
|
+
}
|
208
|
+
|
209
|
+
.actionsleft {
|
210
|
+
float: left;
|
211
|
+
}
|
212
|
+
|
213
|
+
.actionsright {
|
214
|
+
float: right;
|
215
|
+
text-align: right;
|
216
|
+
}
|
217
|
+
|
218
|
+
@media screen and (max-width: 800px) {
|
219
|
+
.actions {
|
220
|
+
padding-top: 120px;
|
221
|
+
}
|
222
|
+
.actionsleft, .actionsright {
|
223
|
+
float: none;
|
224
|
+
text-align: left;
|
225
|
+
margin-bottom: 1em;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
th {
|
230
|
+
text-decoration: underline;
|
231
|
+
font-weight: normal;
|
232
|
+
text-align: left;
|
233
|
+
}
|
234
|
+
|
235
|
+
#features ul {
|
236
|
+
list-style: none;
|
237
|
+
margin: 0 0 1em;
|
238
|
+
padding: 0 0 0 1.2em;
|
239
|
+
}
|
240
|
+
|
241
|
+
#features li:before {
|
242
|
+
content: "-";
|
243
|
+
width: 1em;
|
244
|
+
display: inline-block;
|
245
|
+
padding: 0;
|
246
|
+
margin: 0;
|
247
|
+
margin-left: -1em;
|
248
|
+
}
|
249
|
+
|
250
|
+
.rel {
|
251
|
+
margin-bottom: 0;
|
252
|
+
}
|
253
|
+
.rel-note {
|
254
|
+
margin-top: 0;
|
255
|
+
color: #555;
|
256
|
+
}
|
257
|
+
|
258
|
+
pre {
|
259
|
+
padding-left: 15px;
|
260
|
+
border-left: 2px solid #ddd;
|
261
|
+
}
|
262
|
+
|
263
|
+
code {
|
264
|
+
padding: 0 2px;
|
265
|
+
}
|
266
|
+
|
267
|
+
strong {
|
268
|
+
text-decoration: underline;
|
269
|
+
font-weight: normal;
|
270
|
+
}
|
271
|
+
|
272
|
+
.field {
|
273
|
+
border: 1px solid #A21313;
|
274
|
+
}
|