mumuki-javascript-runner 1.9.1 → 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: 436586462e5ac3dfa62e91c89a1612709e2c7a4b32c304db3296396b5df4a28d
4
- data.tar.gz: 67754bdf4932c0b3cc19ee69851e2aa011e7ac90735e908c8c4d47ed54662fbb
3
+ metadata.gz: 576b2ef19844bf20f0bf23271760146a281c15f5ab29d467f3584aefd7e3bfd6
4
+ data.tar.gz: 2ccfae57e9952fee4bcee8d6b20c3b62c2dc029b269ab4b803223630cf3e79ee
5
5
  SHA512:
6
- metadata.gz: fa1b58d1a3594eae43705d367197bb730133b8b563cc815f491531ea1c9085e095bee2fd99e25e179e1bdb2ee3673bd3dece8d89ddac710528d687a4148c60ae
7
- data.tar.gz: 9b0e5af50fc6f007fa1fb7694b2848b002ba2511e143920e0b8ce675fd050d1ddc9e82eb31308eac16d342ff30b0665bca1df0fe71429205d5d6fc11d9ba5dd2
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,17 +29,21 @@ js
29
29
  end
30
30
 
31
31
  def to_structured_results(_file, result, status)
32
- query_result = result[/#{query_separator}\n\K.*?(?=\n#{goal_separator}|\z)/m]
33
32
  goal = result[/#{goal_separator}\n\K.*(?=\n)/m]
34
33
 
35
34
  {
36
- query: to_query_result(query_result, status),
35
+ query: to_query_result(result, status),
37
36
  goal: goal,
38
37
  status: status
39
38
  }
40
39
  end
41
40
 
42
41
  def to_query_result(result, status)
43
- { 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
44
48
  end
45
49
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module JavascriptVersionHook
2
- VERSION = '1.9.1'
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.9.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: 2022-05-04 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