mumuki-laboratory 5.0.9 → 5.0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 687cb25da2b7b117a69aee4ea6f6e43c273dd02df35f6d950e04bba9a6c29a02
|
4
|
+
data.tar.gz: 5fc3c5c9f5a8692e90aa923cd232e34d7450c35623f23a52bb1cf12cac7d7cdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f2a09624da7c57fed02a5d0e0dcac4deb359d4775976543329e3a570292018504fbe264159d8c0f1a2cb639e7cd4202f61a579a7226a55b14f5e6b771d75151
|
7
|
+
data.tar.gz: 4c138d17b4073663497a1f1e558ce2f57dfe95c16f4990c2fa2cc790a78decebf63a849ad5efd7dbca4c5afbf584723d0d70cb03ba73538c0d49e4ca29377b89
|
@@ -6,16 +6,17 @@ var mumuki = mumuki || {};
|
|
6
6
|
}
|
7
7
|
|
8
8
|
Laboratory.prototype = {
|
9
|
-
|
9
|
+
runLocalTests: function (solution) {
|
10
10
|
var token = new mumuki.CsrfToken();
|
11
11
|
var request = token.newRequest({
|
12
12
|
type: 'POST',
|
13
13
|
url: window.location + '/solutions',
|
14
|
-
data:
|
15
|
-
solution: solution
|
16
|
-
}
|
14
|
+
data: solution
|
17
15
|
});
|
18
16
|
return $.ajax(request)
|
17
|
+
},
|
18
|
+
runTests: function(content) {
|
19
|
+
return this.runLocalTests({ solution: content });
|
19
20
|
}
|
20
21
|
};
|
21
22
|
|
@@ -55,17 +55,17 @@ var mumuki = mumuki || {};
|
|
55
55
|
editor.setOption('theme', 'default ' + language);
|
56
56
|
}
|
57
57
|
|
58
|
-
function
|
59
|
-
|
60
|
-
|
61
|
-
})
|
58
|
+
function syncContent(){
|
59
|
+
mumuki.page.editors.each(function (_, editor) {
|
60
|
+
editor.save();
|
61
|
+
});
|
62
62
|
}
|
63
63
|
|
64
64
|
mumuki.editor = mumuki.editor || {};
|
65
65
|
mumuki.editor.setupCodeMirrors = setEditorLanguage;
|
66
66
|
mumuki.editor.toggleFullscreen = toggleFullscreen;
|
67
67
|
mumuki.editor.indentWithSpaces = indentWithSpaces;
|
68
|
-
mumuki.editor.
|
68
|
+
mumuki.editor.syncContent = syncContent;
|
69
69
|
|
70
70
|
mumuki.page = mumuki.page || {};
|
71
71
|
mumuki.page.dynamicEditors = [];
|
@@ -64,10 +64,10 @@ var mumuki = mumuki || {};
|
|
64
64
|
submitButton.disable();
|
65
65
|
resultsBox.waiting();
|
66
66
|
|
67
|
-
|
68
|
-
var solution =
|
67
|
+
mumuki.editor.syncContent();
|
68
|
+
var solution = getContent();
|
69
69
|
|
70
|
-
bridge.
|
70
|
+
bridge.runLocalTests(solution).always(function () {
|
71
71
|
$(document).renderMuComponents();
|
72
72
|
resultsBox.done();
|
73
73
|
}).done(function (data) {
|
@@ -79,6 +79,15 @@ var mumuki = mumuki || {};
|
|
79
79
|
|
80
80
|
});
|
81
81
|
|
82
|
+
function getContent(){
|
83
|
+
var content = {};
|
84
|
+
$('.new_solution').serializeArray().forEach(function(it) {
|
85
|
+
content[it.name] = it.value;
|
86
|
+
});
|
87
|
+
|
88
|
+
return content;
|
89
|
+
}
|
90
|
+
|
82
91
|
function animateTimeoutError(submitButton) {
|
83
92
|
var image = $('#submission-result-error-animation')[0];
|
84
93
|
image.src = mumuki.errors.error_timeout_1.url;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-laboratory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|