isomorfeus-puppetmaster 0.6.10 → 0.6.13
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: daa437e0662a07334e47cb067440f006bc9fa6015b2fe4f54deb57f1e11e19ee
|
4
|
+
data.tar.gz: a4f75f12075a733c14d4e3a0716e4c8b7018d33de39cee4e649bc48f06e4302f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e63d3a9f93d812958ff8897a5f56385c4ae940790a3635e1909920d9078ae69c50cb57152646fd76970a02b1c46e71238bcf50bb3b7be59e6de7c2eff3ddb0f
|
7
|
+
data.tar.gz: eb1c6e57fc5a4e5cc0b7bdf82a394cd14fdbdfaea540ea52be667c3c2440f0596d04bbf177b3c2eee054d32ae094ef0a3b8ccdaac225f7988e08ecb175321fb8
|
@@ -9,8 +9,8 @@ class Puppeteer::ExecutionContext
|
|
9
9
|
catch (e) { return { error: e.name, message: e.message, stack: e.stack }; }
|
10
10
|
}
|
11
11
|
let res = fun();
|
12
|
-
if (res && res.$to_n) { res = res.$to_n() }
|
13
|
-
return (res
|
12
|
+
if (res && res.$to_n) { res = res.$to_n(); }
|
13
|
+
return ((res === Opal.nil) ? null : res);
|
14
14
|
}
|
15
15
|
JAVASCRIPT
|
16
16
|
if res.is_a?(Hash) && res.key?('error') && res.key?('message') && res.key?('stack')
|
@@ -34,8 +34,8 @@ class Puppeteer::ExecutionContext
|
|
34
34
|
catch (e) { return { error: e.name, message: e.message, stack: e.stack }; }
|
35
35
|
}
|
36
36
|
let res = fun();
|
37
|
-
if (res && res.$to_n) { res = res.$to_n() }
|
38
|
-
return (res
|
37
|
+
if (res && res.$to_n) { res = res.$to_n(); }
|
38
|
+
return (res === Opal.nil) ? null : res;
|
39
39
|
}
|
40
40
|
JAVASCRIPT
|
41
41
|
if res.is_a?(Hash) && res.key?('error') && res.key?('message') && res.key?('stack')
|
@@ -78,7 +78,7 @@ class Puppeteer::ExecutionContext
|
|
78
78
|
end
|
79
79
|
result, exception = evaluate <<~JAVASCRIPT
|
80
80
|
function () {
|
81
|
-
var
|
81
|
+
var res;
|
82
82
|
var exception = false;
|
83
83
|
if (Opal.await_ruby_exception) {
|
84
84
|
var e = Opal.await_ruby_exception;
|
@@ -87,11 +87,13 @@ class Puppeteer::ExecutionContext
|
|
87
87
|
let r = Opal.gvars.promise_result;
|
88
88
|
exception = { message: r.$message(), name: r.$class().$name(), stack: r.$backtrace() }
|
89
89
|
} else if (Opal.gvars.promise_result['$respond_to?']('to_n')) {
|
90
|
-
|
91
|
-
} else {
|
90
|
+
res = Opal.gvars.promise_result.$to_n()
|
91
|
+
} else { res = Opal.gvars.promise_result };
|
92
92
|
delete Opal.gvars.promise_result;
|
93
93
|
delete Opal.gvars.promise_resolved;
|
94
|
-
|
94
|
+
if (res && res.$to_n) { res = res.$to_n(); }
|
95
|
+
res = ((res === Opal.nil) ? null : res);
|
96
|
+
return [res, exception];
|
95
97
|
}
|
96
98
|
JAVASCRIPT
|
97
99
|
if exception
|
@@ -23,6 +23,10 @@ module Isomorfeus
|
|
23
23
|
'Content-Type' => 'application/json')
|
24
24
|
else
|
25
25
|
begin
|
26
|
+
if Isomorfeus.respond_to?(:init_store)
|
27
|
+
Isomorfeus.init_store
|
28
|
+
Isomorfeus.store.clear! if Isomorfeus.store.respond_to?(:clear!)
|
29
|
+
end
|
26
30
|
result = TOPLEVEL_BINDING.eval(request_hash['code']) if request_hash['code']
|
27
31
|
response = Rack::Response.new(Oj.dump({ 'result' => result }),
|
28
32
|
200,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-puppetmaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|