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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 643e7004181714b9389b777b05343707d8c83af4b2aa5f409b433b7a290af5f7
4
- data.tar.gz: 42fb43b4425a6ff90c7522ae1de68980c4f0683e80dfb083db70d89be6f8dd85
3
+ metadata.gz: 576b2ef19844bf20f0bf23271760146a281c15f5ab29d467f3584aefd7e3bfd6
4
+ data.tar.gz: 2ccfae57e9952fee4bcee8d6b20c3b62c2dc029b269ab4b803223630cf3e79ee
5
5
  SHA512:
6
- metadata.gz: 40a7062a6a43c6caf6a4623c7977d3b4e052d06a830f2c8e3242c4d49706e9afb73cfb47d09a6e1674acbda7cc897c5730bd9c6351e5e4e1dad289b4a74d622a
7
- data.tar.gz: 72ff4deb4365eef74e042ad1edfe9203e85cd379c8d7307d269348d8521e442153d9751c8ce985ae905d4b9b0627f54d1217f05dd83c7b1121b1539cad226522
6
+ metadata.gz: 732d1a2e85122731e9956ea685bcd9ade6204cf7132e5678e0b761ab81faf0a6e59a98adabf4b4845d69ef91314417d78721c667edd3aa171420673ee425fe4c
7
+ data.tar.gz: 9ce94c93f315781e1bfdf494a674221f5a655b7b567607c466f6561f25f4f3ecc479774bd0509d52919b21ecdd35b06e846ce8b0f8fb3e0a8679db0facc6b2e2
data/lib/query_hook.rb CHANGED
@@ -28,7 +28,10 @@ function mumukiConsolePrettyPrint(e) {
28
28
 
29
29
  #{r.content}
30
30
 
31
+ const mumukiConsoleLog = console.log
32
+ console.log = (...data) => {}
31
33
  #{compile_cookie(r.cookie)}
34
+ console.log = mumukiConsoleLog
32
35
  javascript
33
36
  end
34
37
 
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
- /#{query_separator}
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($1, status),
40
- goal: $2,
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
- { result: result, status: status }
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
@@ -1,3 +1,3 @@
1
1
  module JavascriptVersionHook
2
- VERSION = '1.8.0'
2
+ VERSION = '1.9.2'
3
3
  end
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.8.0
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: 2021-03-25 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit