mumuki-javascript-runner 1.8.0 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/query_hook.rb +3 -0
- data/lib/try_hook.rb +10 -9
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 576b2ef19844bf20f0bf23271760146a281c15f5ab29d467f3584aefd7e3bfd6
|
4
|
+
data.tar.gz: 2ccfae57e9952fee4bcee8d6b20c3b62c2dc029b269ab4b803223630cf3e79ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732d1a2e85122731e9956ea685bcd9ade6204cf7132e5678e0b761ab81faf0a6e59a98adabf4b4845d69ef91314417d78721c667edd3aa171420673ee425fe4c
|
7
|
+
data.tar.gz: 9ce94c93f315781e1bfdf494a674221f5a655b7b567607c466f6561f25f4f3ecc479774bd0509d52919b21ecdd35b06e846ce8b0f8fb3e0a8679db0facc6b2e2
|
data/lib/query_hook.rb
CHANGED
data/lib/try_hook.rb
CHANGED
@@ -29,20 +29,21 @@ js
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def to_structured_results(_file, result, status)
|
32
|
-
/#{
|
33
|
-
?(.*)
|
34
|
-
#{goal_separator}
|
35
|
-
?(.*)
|
36
|
-
/m =~ result
|
32
|
+
goal = result[/#{goal_separator}\n\K.*(?=\n)/m]
|
37
33
|
|
38
34
|
{
|
39
|
-
query: to_query_result(
|
40
|
-
goal:
|
35
|
+
query: to_query_result(result, status),
|
36
|
+
goal: goal,
|
41
37
|
status: status
|
42
38
|
}
|
43
39
|
end
|
44
40
|
|
45
41
|
def to_query_result(result, status)
|
46
|
-
|
42
|
+
case result
|
43
|
+
when /#{query_separator}\n(.*?)\n(#{goal_separator}|\z)/m
|
44
|
+
{ result: $1, status: status }
|
45
|
+
else
|
46
|
+
{ result: result, status: :errored }
|
47
|
+
end
|
47
48
|
end
|
48
|
-
end
|
49
|
+
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-javascript-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|